lib/Transfer/Input/JsonValidator.php
private function parseJson(string $data): stdClass
    {
        $data = json_decode($data);

        if ($data instanceof stdClass) {
            return $data;
        }

        $errorCode = json_last_error();

        if ($errorCode !== JSON_ERROR_NONE) {
            throw JsonValidationException::parseError(json_last_error_msg(), $errorCode);
        }

        throw JsonValidationException::notAcceptable(
            sprintf('Expected a JSON object, got %s', gettype($data))
        );
    }
private function parseJson(string $data): stdClass
    {
        $data = json_decode($data);

        if ($data instanceof stdClass) {
            return $data;
        }

        $errorCode = json_last_error();

        if ($errorCode !== JSON_ERROR_NONE) {
            throw JsonValidationException::parseError(json_last_error_msg(), $errorCode);
        }

        throw JsonValidationException::notAcceptable(
            sprintf('Expected a JSON object, got %s', gettype($data))
        );
    }
private function parseJson ( string $ data ) : stdClass { $ data = json_decode ( $ data ) ; if ( $ data instanceof stdClass ) { return $ data ; } $ errorCode = json_last_error ( ) ; if ( $ errorCode !== JSON_ERROR_NONE ) { throw JsonValidationException :: parseError ( json_last_error_msg ( ) , $ errorCode ) ; } throw JsonValidationException :: notAcceptable ( sprintf ( 'Expected a JSON object, got %s' , gettype ( $ data ) ) ) ; }
Parses JSON data.

@throws \Netgen\BlockManager\Exception\Transfer\JsonValidationException
Parses JSON data .