Closed GoogleCodeExporter closed 9 years ago
This is a parser error so I wonder if your incoming JSON string is complete
(although it seems to print fine). Can
you try adding a blank space at the end and see if that works (that shouldn't
actually make any difference, I am
just trying a shot in the dark).
Can you debug this further (debug through parser and see what is going on)? We
do not have the setup or
expertise to use Spring, so we need someone else to narrow down the problem.
Thanks.
Original comment by inder123
on 23 Sep 2009 at 5:32
Keeping it open for a bit longer for further input, but deferring it for a
future release.
Original comment by inder123
on 29 Sep 2009 at 5:55
I'm a bit confused here.
In your example you have the following:
String jsonString = "";
try {
Gson gson = new Gson();
System.out.println(json); //JSON prints fine here
Search ns = gson.fromJson(jsonString, Search.class);
...
} catch (SomeException e) { ... }
-------------
Shouldn't the parameter into the gson.fromJson(...) method be the "json"
variable not
"jsonString"?
Original comment by joel.leitch@gmail.com
on 10 Oct 2009 at 12:17
Yes, you are correct. My apologies. This was a project I didn't have access to
anymore and I went back and wrote something to test and it works. This should be
closed as Not a Bug.
Original comment by chrislha...@gmail.com
on 10 Oct 2009 at 1:21
Original comment by inder123
on 10 Oct 2009 at 6:06
Original issue reported on code.google.com by
chrislha...@gmail.com
on 7 Aug 2009 at 11:07