Using built-in JSON formatting for PHP 5.4+. Reorganizing api_call output.