Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.1
-
Fix Version/s: 1.4
-
Component/s: Converters
-
Labels:None
-
JDK version and platform:1.6.0_20
Description
When converting a class that implements Externalizable with XStream, JSON with duplicate keys is generated.
{ "string": "文件名 +().mp3", "long": 690037, "null": {}, "long": 0, "null": {}, "double": 1.0, "null": {}, "null": {} }
Now, obj['long'] will be 0. I think you are looking for something like this:
[ [ "string", "文件名 +().mp3" ], [ "long", 690037 ], [ "null", {} ], [ "long", 0 ], [ "null", {} ], [ "double", 1.0 ], [ "null", {} ], [ "null", {} ] ]
Hi Johann,
we should know which JSON driver you're using resp. how you've initialized the XStream.