I have implemented a javascript eval into my text editor. When I select text, and call the command, it passes it off to a node.JS engine and replaces the selection with the return result. In this way I can write a JSON.stringify([anyvalid javascript],null, [indentation]); and instantly get perfect JSON. This is much less troublesome than trying to make a new slightly incompatible format.