src/JsonEncoder.php
public function setNumericEncoding($encoding)
    {
        if (self::JSON_NUMBER !== $encoding && self::JSON_STRING !== $encoding) {
            throw new \InvalidArgumentException(sprintf(
                'Expected JsonEncoder::JSON_NUMBER or JsonEncoder::JSON_STRING. '.
                'Got: %s',
                $encoding
            ));
        }

        $this->numericEncoding = $encoding;
    }
public function setNumericEncoding($encoding)
    {
        if (self::JSON_NUMBER !== $encoding && self::JSON_STRING !== $encoding) {
            throw new \InvalidArgumentException(sprintf(
                'Expected JsonEncoder::JSON_NUMBER or JsonEncoder::JSON_STRING. '.
                'Got: %s',
                $encoding
            ));
        }

        $this->numericEncoding = $encoding;
    }
public function setNumericEncoding ( $ encoding ) { if ( self :: JSON_NUMBER !== $ encoding && self :: JSON_STRING !== $ encoding ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected JsonEncoder::JSON_NUMBER or JsonEncoder::JSON_STRING. ' . 'Got: %s' , $ encoding ) ) ; } $ this -> numericEncoding = $ encoding ; }
Sets the encoding of numeric strings.

By default, non-associative arrays are decoded as JSON strings.

@param int $encoding One of the constants {@link JSON_STRING} and {@link JSON_NUMBER}

@throws \InvalidArgumentException If the passed encoding is invalid
Sets the encoding of numeric strings .