drewwyatt
drewwyatt

Reputation: 6027

How do I use json.net in my class after installing it with NuGet?

I installed json.net using the NuGet package manager:

enter image description here

But now when I actually try to use the thing by doing something like:

JObject message = Jobject.parse(someJson);

I am getting Type or namespace name 'JObject' could not be found.

How do I include it in my solution after NuGet installation?

Upvotes: 11

Views: 14245

Answers (1)

Thomas Levesque
Thomas Levesque

Reputation: 292695

You need to import the namespace containing the JObject class:

using Newtonsoft.Json.Linq;

Upvotes: 21

Related Questions