Added JSON encoding.
fixed some subtle type errors
adding python driver support for R_JSON
fixing copy-paste typo in python driver
adding R_JSON support to the js driver
Merge branch '1571_json_protocol' into next