Tuesday, July 17, 2007

JSON + Java...fixed (Geek Post Warning!)

I thought it would be nice to finally post something related to what I actually do for a living...and more to the point, along the lines of the actual title of this blog. So here's a 'microcode' post for everyone to enjoy.

I have been messing around with JSON in a Java environment (coding up servlet front-ends to our software components which would talk in JSON instead of the usual SOAP), and I leveraged the excellent JSON in Java library from json.org. But I quickly noticed that the XML utility in that library - which converts a well-formed XML string to and from JSON - was a bit broken, in that it ignored/lost XML attributes. So I took some time to debug and fix it (since we do need correct XML attribute support when dealing with namespaces). Works great, and I can now go back and forth seamlessly between XML and JSON and vice versa. Sweet.

[via JSON in Java]

0 comments: