I did implement a JSON version of XML-RPC as part of the package, and it works really nicely, but has at least one major undecided feature. I'm asking that people who think about JSON give this some thought, and perhaps suggest prior art to look at. #
First the types that work. These XML-RPC types are not a problem because JSON understands them. When it sees one of these in JSON text, the parser will create a property or object with the correct type. #
What happens in the current implementation? The value is converted to and transmitted as a string. You can test it by running the betty test app locally and calling examples.echoParams using the debugger. Here's a screen shot showing a setup for testing base64 data, and here's one that tests a dateTime.iso8601.#
As you can see from the screen shots above, dateTime.iso8601 and base64 types are converted to strings. The server toolkit will pass them up the stack as strings, where the XML-based version will pass up Date and Buffer types.#
I put this out there as a design problem for JSON experts to consider.#
Update: An egregious hack for adding date and base64 types to JSON.#