add decode_json() and encode_json()