src/JsonDecoder.php
public function setObjectDecoding($decoding)
    {
        if (self::OBJECT !== $decoding && self::ASSOC_ARRAY !== $decoding) {
            throw new \InvalidArgumentException(sprintf(
                'Expected JsonDecoder::JSON_OBJECT or JsonDecoder::ASSOC_ARRAY. '.
                'Got: %s',
                $decoding
            ));
        }

        $this->objectDecoding = $decoding;
    }
public function setObjectDecoding($decoding)
    {
        if (self::OBJECT !== $decoding && self::ASSOC_ARRAY !== $decoding) {
            throw new \InvalidArgumentException(sprintf(
                'Expected JsonDecoder::JSON_OBJECT or JsonDecoder::ASSOC_ARRAY. '.
                'Got: %s',
                $decoding
            ));
        }

        $this->objectDecoding = $decoding;
    }
public function setObjectDecoding ( $ decoding ) { if ( self :: OBJECT !== $ decoding && self :: ASSOC_ARRAY !== $ decoding ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected JsonDecoder::JSON_OBJECT or JsonDecoder::ASSOC_ARRAY. ' . 'Got: %s' , $ decoding ) ) ; } $ this -> objectDecoding = $ decoding ; }
Sets the decoding of JSON objects.

By default, JSON objects are decoded as instances of {@link \stdClass}.

@param int $decoding One of the constants {@link JSON_OBJECT} and {@link ASSOC_ARRAY}

@throws \InvalidArgumentException If the passed decoding is invalid
Sets the decoding of JSON objects .