Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In this tutorial: http://www.asp.net/web-api/videos/getting-started/custom-validation Jon uses

dynamic error = new JsonObject();

with

using System.Json;

I guess it's the JsonObject here: http://msdn.microsoft.com/en-us/library/system.json.jsonobject(v=vs.110).aspx located in:

  • Namespace: System.Json
  • Assembly: System.Runtime.Serialization (in System.Runtime.Serialization.dll)

I've added System.Runtime.Serialization a reference but still cannot find System.Json.

Am I reading the Microsoft docs wrong? (I'm using .NET 4.5)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
775 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try this:

PM> Install-Package System.Json -Version 4.0.20126.16343

Per: http://nuget.org/packages/System.Json

It worked!

If you have questions on how to add enter nuget code, please follow the link below: http://docs.nuget.org/docs/start-here/using-the-package-manager-console


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...