Tagged Questions

The Gson project is hosted at and available for download from http://code.google.com/p/google-gson/. Alternatives Alternative Java-to-JSON binding solutions with similar APIs include FastJSON, Jackson, and svenson. Yet more Java-to-JSON libraries are listed at json.org. Pros and Cons of the ...

learn more… | top users | synonyms

0
votes
0answers
12 views

Out of memory exception in gson.fromJson()

I use the following code for converting Json string(strWebserviceResult) to my Object: EntMyClass entMyClass = gson.fromJson(strWebserviceResult,EntMyClass.class); When strWebserviceResult is large ...
1
vote
1answer
19 views

How to obtain the same result with google-Gson and JSON.stringfy

in my java code, I have a class with o member of type Map<String,String>. I use google Gson library to convert from object to json string and viceversa. I want to do the same with javascript ...
-5
votes
2answers
37 views

How to parse json nested array

I want to fetch data from json array using java gson library following is the json string to parse { 'result': 'success', 'value': { 'count': 201671, 'data': [ { ...
2
votes
1answer
23 views

Serializing anonymous classes with Gson

Is there any reason to why you cant serialize anonymous classes to Json? Example: public class AnonymousTest { private Gson gson = new Gson(); public void goWild() { ...
0
votes
1answer
36 views

Performance of synchronized getHandlerFor(Type) in Gson

I'm using gson 1.7 and i see that it has a serialized block in toJson() in class final class ParameterizedTypeHandlerMap<T>{ .... public synchronized T getHandlerFor(Type type) { .... If I'm ...
0
votes
0answers
34 views

parse xml huge file and deserialize gson android

I am working on android. What is the best way to parse and xml and deserialize with gson? From the webservice I took the xml and put it on an sdcard. Now I have to parse the xml and deserialize with ...
0
votes
2answers
27 views

Extracting all values from nested JSON

I am fairly new to JSON parser and I am trying to extract all data set from "sizes" tag i.e extracting values (small, yes, xsmall, NO, Medium and yes) from the JSON file in a complex nested loop but ...
0
votes
0answers
12 views

Android gson streaming

I have the txt file with contains the json string.i have already create the class and put the @SerializedName("side_effect") for each element. I have read from this ...
2
votes
1answer
75 views

GSON Serialization very very slow

I'm trying to serialize an array of 7000 POJO using GSON and the serialization time is extremely slow. It's on the order of 3-5 seconds to serialize an array of the following object: public class ...
1
vote
0answers
53 views

Can't read json from a socket on Java

I'm trying to send and receive Json messages on Java. I've implemented a server in which there's a thread pool which waits on a socket queue until a new message arrives. I tried testing everything ...
1
vote
2answers
80 views

Parsing a JSON file with GSON

I'm having trouble reading a JSON file into a POJO. Let me give you a snippet of what my JSON file entails: { "Speidy": { "factionId": "2", "role": "ADMIN", "title": "", ...
1
vote
0answers
30 views

not getting data in sequence

i am trying to get data in sequence. when it display that time sequence is change. can any one explain me ? {"data": [ {"country":"Angola", "capital": "Luanda"}, {"country":"Botswana", ...
3
votes
2answers
44 views

Include gson in my java program

So far I have only used standard libraries in my programs. I'm just making a simple console application and I'm not using any IDE, just simple text editor (because I don't need anything more complex ...
2
votes
1answer
35 views

GSON not calling my TypeAdapter for a type which is an interface

GSON appears to be doing some kind of trick where it looks at the internal fields of my JavaBeans instead of using the publically-accessible property information. Unfortunately this won't fly for us ...
0
votes
1answer
37 views

JSON parsing using GSON - Setting up class hierarchy

I can't seem to wrap my head around how to setup my class hierarchy for JSON conversion using GSON. My JSON looks like: { "Users": { "id": 1, "name": "Jim", "location": "Huntsville" ...

1 2 3 4 5 40
15 30 50 per page