src/Graviton/GeneratorBundle/Definition/Loader/Loader.php
protected function createJsonDefinition($json)
    {
        $errors = $this->validator->validateJsonDefinition($json);
        if (!empty($errors)) {
            throw new ValidationException($errors);
        }

        $definition = $this->serializer->deserialize(
            $json,
            'Graviton\\GeneratorBundle\\Definition\\Schema\\Definition',
            'json'
        );

        return new JsonDefinition($definition);
    }
protected function createJsonDefinition($json)
    {
        $errors = $this->validator->validateJsonDefinition($json);
        if (!empty($errors)) {
            throw new ValidationException($errors);
        }

        $definition = $this->serializer->deserialize(
            $json,
            'Graviton\\GeneratorBundle\\Definition\\Schema\\Definition',
            'json'
        );

        return new JsonDefinition($definition);
    }
protected function createJsonDefinition ( $ json ) { $ errors = $ this -> validator -> validateJsonDefinition ( $ json ) ; if ( ! empty ( $ errors ) ) { throw new ValidationException ( $ errors ) ; } $ definition = $ this -> serializer -> deserialize ( $ json , 'Graviton\\GeneratorBundle\\Definition\\Schema\\Definition' , 'json' ) ; return new JsonDefinition ( $ definition ) ; }
Deserialize JSON definition

@param string $json JSON code
@return JsonDefinition
@throws InvalidJsonException  If JSON is invalid
@throws ValidationException   If definition is not valid
Deserialize JSON definition