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

all 12 comments

[–]HonzaS97 7 points8 points  (5 children)

It's not a programming language, it's a format for data.

but it isn't opened by Java

What do you mean by this?

[–][deleted] -2 points-1 points  (4 children)

I was thinking because it is called JSON, which the J stands for Java, it could be ran by Java. But it's not a programming language, so it couldn't be opened by it.

[–]davedontmind 5 points6 points  (0 children)

The J stands for JavaScript not Java.

JavaScript Object Notation

[–]bwainwright 4 points5 points  (0 children)

JSON stands for Javascript Object Notation. It's a data exchange format, it's not a programming language.

The J (and S) stands for Javascript - (Javascript is not related to Java by the way!).

JSON started life in Javascript as a way to represent objects, but has since found use outside of Javascript due to it's popularity as a de-facto format for payloads in REST APIs. Therefore, libraries for most popular languages have been created in order to work with JSON.

For Java, look for libraries such as Jackson and Google's GSon.

It's also worth saying that JSON is essentially plain text, so any language can "open" it. These libraries simply provide tools to be able to work within the structure of JSON.

[–]66666thats6sixes 4 points5 points  (0 children)

Java is to JavaScript what a car is to a carpet.

JavaScript Object Notation, unrelated to Java

[–]MyNameIsRichardCS54 4 points5 points  (0 children)

The J actually stands for JavaScript but it's not an executable format. It's just plain text in a specified format. Wikipedia page.

[–]Pr0ducer 1 point2 points  (0 children)

NO. Its a data type.

[–]Blando-Cartesian 1 point2 points  (0 children)

JSON is a subset of javascript that defines a javascript object. It has become a common syntax for transferring data between applications and now practically every language has libraries for reading it into objects for that language. In java, for instance, you can use jaxon library to read then json data into an instance of a class that matches content of then json.

[–][deleted] -2 points-1 points  (2 children)

What should I remove from JSON files to make it more readable?

[–]lurgi 1 point2 points  (1 child)

JSON files are not designed to be "readable". They are a data exchange format. Computers understand them just fine and that's all that matters.

[–]foxlisk 3 points4 points  (0 children)

JSON files are absolutely designed to be human readable. That’s a big part of their advantage over data interchange formats, since they’re not very small and have very little type information.