-
Notifications
You must be signed in to change notification settings - Fork 23
When a map is used JSON serialization is wrong #74
Comments
@ghillairet do you have a tentative due date for 0.14? Trying to decide the best course of action around this, thanks! |
The fix for this one will be in maven snapshot repository today or tomorrow. For maps that don't have keys of type string the serialization will look like that {
"eClass" : "http://www.emfjson.org/jackson/model#//ETypes",
"values" : [ {
"key" : {
"eClass" : "http://www.emfjson.org/jackson/model#//Type",
"name" : "t1"
},
"value" : {
"eClass" : "http://www.emfjson.org/jackson/model#//Value",
"value" : 1
}
}, {
"key" : {
"eClass" : "http://www.emfjson.org/jackson/model#//Type",
"name" : "t2"
},
"value" : {
"eClass" : "http://www.emfjson.org/jackson/model#//Value",
"value" : 2
}
} ]
} A map with keys being string is serialized like that {
"eClass" : "http://www.emfjson.org/jackson/model#//ETypes",
"values" : {
"t1": 1,
"t2": 2
}
} |
@ghillairet great, thanks Guillaume! |
@ghillairet hi Guillaume, any update on release 0.1.4? Thanks! |
I won't have time before next week, due to the move to the organization I have to re-setup the build for the eclipse update site. |
@ghillairet let me know if there's anything I can do to help :) |
0.14 has been released (https://github.com/emfjson/emfjson-jackson/releases/tag/0.14.0) and includes fix for this issue. |
@ghillairet if the key is not contained in the map should there be a reference instead of the whole object? |
Yes you're right, see #83 |
We have an ecore with one reference named "initialValue" that is a map, here is a screenshot of the ecore:
![screen shot 2015-12-09 at 15 07 52](https://cloud.githubusercontent.com/assets/81127/11688810/a599d1e2-9e86-11e5-8aca-72650d4cf1f9.png)
When such reference is serialized the following JSON is produced:
The problem is the double :{ :{ the second colon is unexpected.
Uncaught SyntaxError: Unexpected token :
The text was updated successfully, but these errors were encountered: