the opposite of to_json