Sergio
Sergio

Reputation: 3387

Standard way to read streamed Jsons Java

there is a Java Standard way to read/write Json streams without using Gson, Jackson,... (other json parsers) ?, Currently i have a file like this:

file.conf:

01={"string":"Test","number":25,"array":[1,2,3],"object":{"property":"Jack","subobj":{"arr":["php","java"],"numero":1}}}

02=other json object 

03=other json object

I need the most standard way, to get a Object (POJO). Thanks for any help.

Upvotes: 0

Views: 329

Answers (2)

Carlo Pellegrini
Carlo Pellegrini

Reputation: 5686

In plain java API there's not any implementation.

Also, I would not suggest you to create your implementation (parsers aren't so easy to implement).

Upvotes: 0

Philipp
Philipp

Reputation: 69663

Java doesn't have a standard class for parsing JSON. That's why there are so many libraries for that (json.org lists 23).

When you really want to do it without an external library you can try to build your own parser using regular expressions and/or string operations, but that would be a terrible idea. Really, don't reinvent the wheel and pick a library.

Upvotes: 3

Related Questions