Use WriteJSON and ReadJSON on Conn struct.
Added WriteJSON/ReadJSON deprecated methods for backwards compatibility.
Fix test for deprecated JSON funcs.