-1

Attempting to use JSON serialization assembly reference for C#.Net project.

Apparently this has to be separately downloaded and installed through the management of NuGet packages. This is detailed in other answers is StackOverflow. However, much to my surprise, this does not seem to have resolved the problem.

Manage NuGet packages

.

JSON.Net

The System.Runtime.Serialization.Json reference also does not appear in the Framework Assemblies. There does not seem to be any mention of JSON in the extensions either.

.Net Framework Assemblies

8
  • Could you give constructive criticism instead of downvoting and voting to close. You (anonymously) have voted to close due to the question "being unclear". If you find it unclear you can comment below the question. Thank you. Commented Jul 12, 2013 at 17:36
  • I've not downvoted but asking, didn't you find assemblies in your bin folder after installing nu-get package? Commented Jul 12, 2013 at 17:41
  • 2
    @Duncan no. If you want to use it you need using Newtonsoft.Json;, they're different assemblies and you should just use json.net cause as I was just saying it's a lot better (newtonsoft.json is json.net in case you're not aware). Commented Jul 12, 2013 at 17:45
  • 1
    json.NET refers to the json parsing tools developed by James Newton King. Newtonsoft.Json is one of the assemblies/namespaces within json.NET. I put that comment in parens because I was interchanging the names and wanted to make it clear that I was referring to the same thing throughout my comments. Also, as I said in the first comment that [CollectionDataContractAttribute] annotation nonsense is required for Serialization.Json, it's not used by other libraries and will cause compilation errors if you don't use that library. In my first comment I have the line of code you should use. Commented Jul 12, 2013 at 18:17
  • 1
    @Duncan use json.NET, the simplest example is here james.newtonking.com/pages/json-net.aspx they have everything you need in the docs there. If you're stuck on something ask specific questions about it on SO. I'm sure there are plenty of users (myself included) who have sufficient json.NET experience that will answer your questions. There are no annotations required. json.NET uses reflection, just define the objects you have in json (or want in json) like you would any others and then call serialize/deserialize on them. Everything works as you'd probably expect. Commented Jul 12, 2013 at 21:07

1 Answer 1

3

You can click show all files icon in solution explorer, and check out the bin folder of your solution, Newtonsoft.Json.dll file must be there.

You can also open packet manager and can view installed packages for given solution.

You just need to add below statement in your .cs files, and you're ready to go.

 using Newtonsoft.Json;
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.