D
D
Denis Ilinykh2015-07-15 16:54:16
Java
Denis Ilinykh, 2015-07-15 16:54:16

What is the correct way to work with JSON in JAVA?

Tell me if there are more convenient JAVA modules for working with JSON than json-simple.
I want the convenience of a dynamic language ( php , perl )
where JSON is translated into an Associative Array.
Or is it worth writing a json-simple wrapper?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DigitalSmile, 2015-07-15
@greyhard

M.b. suitable for Jackson ?

E
Evhen, 2015-07-15
@EugeneP2

gson from google, it couldn't be easier)
google-gson

Gson gson = new GsonBuilder().create();

String json = gson.toJson(someObject);

SomeObject newso = gson.fromJson(json, SomeObject.class);

M
Maxim Moseychuk, 2015-07-15
@fshp

The modules from the mongi driver are good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question