Questions tagged [gson]

Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
39 views

Java Market Summary - JSON

I am writing a java program that will print current market values from a websites api. I used gson to parse the incoming json and Timer to run it every 5 minutes. I was wondering if this was the best ...
0
votes
0answers
35 views

Code with Java REST API and Json Objects (Gson library)

I need to make a POST call with Java to a REST Service. My code works fine, I am just writing in order to ask if there are better ways to do this, or if someone could refactor my code and make it more ...
0
votes
0answers
35 views

Templated JSON parsing methods that work with an element or elements array

Consider the following two Java methods. The first takes a JSON string representing one element, the second representing multiple elements. gson.fromJson() can be ...