Gentlefolk,
I am using CXF/Jettison to marshall/unmarshall XML objects to JSON using
the "mapped" convention of mapping XML namespace to our JSON payloads. That
convention, as you know, using a dot separator to prepend a namespace
prefix onto entity attribute names:
{ "ns1.id" : 4, "ns2:name" : "mike" }
Unfortunately we have discovered that using dot separators cases a problem
with many Javascript frameworks as they reserve the use of dots for
child/parent graph traversal (e.g. Ember)
https://github.com/emberjs/ember.js/issues/9630#issuecomment-63423812
I see that a patch was submitted to Jettison which would allow me to
substitute a different separator but it does not seem to have been accepted
and their mailing list appears DOA.
https://jira.codehaus.org/browse/JETTISON-139
I also tried to use Jackson rather than Jettison to do XML to JSON
marshalling but there is so little documentation related to it I gave up (I
couldnt figure out how to get XML objects that didnt have root element
annotations to serialize after several hours)
I seem to be stuck and this looks like it could potentially be a very
common problem (as Ember is a popular javascript framework). Do I have any
options? Has anyone run into this?
Thanks!
-Mike
I am using CXF/Jettison to marshall/unmarshall XML objects to JSON using
the "mapped" convention of mapping XML namespace to our JSON payloads. That
convention, as you know, using a dot separator to prepend a namespace
prefix onto entity attribute names:
{ "ns1.id" : 4, "ns2:name" : "mike" }
Unfortunately we have discovered that using dot separators cases a problem
with many Javascript frameworks as they reserve the use of dots for
child/parent graph traversal (e.g. Ember)
https://github.com/emberjs/ember.js/issues/9630#issuecomment-63423812
I see that a patch was submitted to Jettison which would allow me to
substitute a different separator but it does not seem to have been accepted
and their mailing list appears DOA.
https://jira.codehaus.org/browse/JETTISON-139
I also tried to use Jackson rather than Jettison to do XML to JSON
marshalling but there is so little documentation related to it I gave up (I
couldnt figure out how to get XML objects that didnt have root element
annotations to serialize after several hours)
I seem to be stuck and this looks like it could potentially be a very
common problem (as Ember is a popular javascript framework). Do I have any
options? Has anyone run into this?
Thanks!
-Mike