0

I installed JSON.net using Nuget and it says it's installed into my Visual Studio project. I see a reference in the references section.

In Javascript, I want to serialize an array, but when I begin to type in JsonConvert, the only thing intellisense shows is JSON.

Apparently, I need to do something so it's available in Javascrip0t, but for the life of me, I can't determine what. I looked to see about including a script reference in the header, but I can't find any .js files. So, I'm at a loss.

Anyone?

1 Answer 1

3

JSON.Net is for C# or VB at the server, not the client.

There should be JSON.parse and JSON.stringify at the client (most browsers have them).

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

2 Comments

Ah, that explain it. My reason for installing is because I'm getting an error stating "JavaScript runtime error: 'json' is undefined" when I try to use JSON.Stringify. Everywhere I searched says to use <!DOCTYPE html> in the page, which I am doing. So, I'm at a loss. I'm using IE11. Thanks.
@SteveM Javascript is case sensitive. Are you typing "json" or "JSON"?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.