name: JsonDecode class_comment: '# * Decodes JSON data. # * # * @author Sander Coolen ' dependencies: - name: JsonParser type: class source: Seld\JsonLint\JsonParser - name: NotEncodableValueException type: class source: Symfony\Component\Serializer\Exception\NotEncodableValueException - name: UnsupportedException type: class source: Symfony\Component\Serializer\Exception\UnsupportedException properties: [] methods: - name: decode visibility: public parameters: - name: data - name: format - name: context default: '[]' comment: "# * Decodes JSON data.\n# *\n# * @author Sander Coolen \n\ # */\n# class JsonDecode implements DecoderInterface\n# {\n# /**\n# * True to\ \ return the result as an associative array, false for a nested stdClass hierarchy.\n\ # */\n# public const ASSOCIATIVE = 'json_decode_associative';\n# \n# /**\n# *\ \ True to enable seld/jsonlint as a source for more specific error messages when\ \ json_decode fails.\n# */\n# public const DETAILED_ERROR_MESSAGES = 'json_decode_detailed_errors';\n\ # \n# public const OPTIONS = 'json_decode_options';\n# \n# /**\n# * Specifies\ \ the recursion depth.\n# */\n# public const RECURSION_DEPTH = 'json_decode_recursion_depth';\n\ # \n# private array $defaultContext = [\n# self::ASSOCIATIVE => false,\n# self::DETAILED_ERROR_MESSAGES\ \ => false,\n# self::OPTIONS => 0,\n# self::RECURSION_DEPTH => 512,\n# ];\n# \n\ # public function __construct(array $defaultContext = [])\n# {\n# $this->defaultContext\ \ = array_merge($this->defaultContext, $defaultContext);\n# }\n# \n# /**\n# *\ \ Decodes data.\n# *\n# * @param string $data The encoded JSON string to decode\n\ # * @param string $format Must be set to JsonEncoder::FORMAT\n# * @param array\ \ $context An optional set of options for the JSON decoder; see below\n# *\n\ # * The $context array is a simple key=>value array, with the following supported\ \ keys:\n# *\n# * json_decode_associative: boolean\n# * If true, returns\ \ the object as an associative array.\n# * If false, returns the object as\ \ nested stdClass\n# * If not specified, this method will use the default\ \ set in JsonDecode::__construct\n# *\n# * json_decode_recursion_depth: integer\n\ # * Specifies the maximum recursion depth\n# * If not specified, this\ \ method will use the default set in JsonDecode::__construct\n# *\n# * json_decode_options:\ \ integer\n# * Specifies additional options as per documentation for json_decode\n\ # *\n# * json_decode_detailed_errors: bool\n# * If true, enables seld/jsonlint\ \ as a source for more specific error messages when json_decode fails.\n# * \ \ If false or not specified, this method will use default error messages from\ \ PHP's json_decode\n# *\n# * @throws NotEncodableValueException\n# *\n# * @see\ \ https://php.net/json_decode" - name: supportsDecoding visibility: public parameters: - name: format comment: null traits: - Seld\JsonLint\JsonParser - Symfony\Component\Serializer\Exception\NotEncodableValueException - Symfony\Component\Serializer\Exception\UnsupportedException interfaces: - DecoderInterface