These functions simply provide a consistent means for calling jsonlite functions toJSON and fromJSON from json-rpc and logger.