Why are JSON Libraries even necessary? Isn't it Native?

I haven’t seen this question really addressed here properly. I realize that UnityScript IS NOT proper JavaScript. That being said, since UnityScript is built on JavScript, and since JavaScript can handle JSON objects natively (using basic dot synax like var firstName=names[0].name), can’t UnityScript handle JSON objects in the same way?

For example, for this JSON Object:


(The formatting there may not be exactly right, I just made it up for an example.)

So in UnityScript, would it not work if I did:
var:String bobsname= jsonObject.names[0].name;

where bobsname now holds the string “Bob” ?
Please let me know if this is true. It would be a real bummer for UnityScript to not natively handle JSON objects.

Let me preface this by saying that I exclusively write my Unity code in C#, and that my only JavaScript experience has been in web development.

Suppose that you receive a JSON formatted response string from a web service request. You still need a library to convert the response string into an instance of an object. In the example you provided, you had a string

{"names": [{"name":"Bob"}, {"name":"Steve"}, {"name":"Joe"}]}

But before you can do anything useful with it, you first need to convert it into an instance of a object. Once it’s been converted into an object, you should then be able to query that object, using “dot” notation.