JamesDeCarlo / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Json attribute tag is not supported #349

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a json object from xml file with json-lib's xmlserializer
2. for an attribute in xml element, the created json object will have a field 
name as '@xxxx'. 
3. I tried to build a java object from that json (using @SerializedName) but 
was told the @xxx is an invalidate json name

What is the expected output? What do you see instead?
Treat it as validate name because a lot of json converters create such field 
name. 

What version of the product are you using? On what operating system?
gson 1.6 on linux

Please provide any additional information below.

Original issue reported on code.google.com by jdai%rea...@gtempaccount.com on 26 Jul 2011 at 7:11

GoogleCodeExporter commented 9 years ago
Fixed in GSON 2.

Original comment by limpbizkit on 1 Oct 2011 at 4:22