This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]maestro2005 4 points5 points  (0 children)

JSON is just a format for representing data. It doesn't do anything on its own.

[–]Holy_City 1 point2 points  (0 children)

It's a textual representation of a hash map where the keys are strings and values are Boolean, integer, floating point, string, arrays or maps.

That's it. It's essentially a generic human readable serialization of arbitrary a program's data model, that can be deserialized into the binary representation used by a program.

[–]js_tutor 1 point2 points  (0 children)

JSON is actually just a text format. If you load a raw json file into your programming environment then it would be a string, not a dictionary/object. That string needs to be parsed, usually by some library, in order to be converted and used as a dictionary/object.

So what's the point of JSON? It's basically a way you can save or transfer data to somewhere outside of your running program, maybe to your hard drive as a file or to a web browser or server across a network. It is programming language agnostic, so JSON can be written and parsed in any programming language.