fix api_response_to_json