Loading a big commit ...
 RSS Git Download  Clone Browse code
File changed: 1

Fix json2xml bug causing broken xml under some conditions}
When JSON object has both string elements and child objects, depending on the order properties could be added to the closing tag of the child. Example: ... { child: {child_property: 'foo'}, parent_property: 'bar' } ... will result in: ...<child child_property='foo'></child parent_property='bar'>... The fix may not be the most optimal one, but works: first handle all strings in the object and add them as properties, then do a second pass and handle arrays and nested child objects.

Dmitry Fink authored on 07/06/2012 02:56:55 • Dmitry Fink committed on 07/06/2012 04:49:49