refactor json_value