You are here

protected function ServicesClientConnectionRestServerParser::parseJson in Services Client 7.2

Same name and namespace in other branches
  1. 7 services_client_connection/plugins/ServicesClientConnectionRestServer.inc \ServicesClientConnectionRestServerParser::parseJson()

Parse JSON response

File

services_client_connection/plugins/ServicesClientConnectionRestServer.inc, line 354

Class

ServicesClientConnectionRestServerParser

Code

protected function parseJson($data) {
  $parsed = json_decode($data, TRUE);

  // Return array as result of services
  if (is_object($parsed)) {
    $parsed = (array) $parsed;
  }
  return $parsed;
}