views:

289

answers:

1

Hi

I have downloaded json.net. and added the dll file by clicking Add Reference. The dll file is now appearing in the bin folder. Now in the code I have tried calling the functions from Json.net

Imports Newtonsoft.Json.JsonReader
Partial Class _Default
    Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub
End Class

I am unable to call any functions. Even when I write Newtonsoft.Json.JsonReader. the function in not appearing.

Is there anything else I am missing?

Thanks

+2  A: 

This is probably because JsonReader is an abstract class therefore you cannot create an instance of it and use its members. Try reading the Json.net documentation where you can find out what classes and members are available for use.

I'm not to sure were you can download the documentation without downloading the binaries but you can get both here.

Draco
JsonReader is abstract. Generally you want to use JsonTextReader.Using JsonConvert is a great shortcut. It has helper methods which create the reader and writer for you when working with JSON strings.
James Newton-King