1

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
  • I fixed the code display in your question. Next time, if you don't know how to format code properly, just use the editor's buttons which will assist you with that. Commented May 29, 2009 at 8:14
  • BTW what are you trying to accomplish? Commented May 29, 2009 at 8:40

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.