JSON format support

As discussed over email.