JsonProcessor

php\format\JsonProcessor

extends: php\format\Processor

Class JsonProcessor

Constants


constant SERIALIZE_PRETTY_PRINT
constant DESERIALIZE_AS_ARRAYS

Methods


__construct($flags = 0)
Параметры:
  • $flagsint
parse($json)

throws php\format\ProcessorException

Параметры:
Результат:

mixed

format($value)

throws php\format\ProcessorException

Параметры:
  • $valuemixed
Результат:

string

formatTo($value, $output)

throws php\format\ProcessorException

Параметры:
onSerialize($nameOfType, $handler = null)
Параметры:
  • $nameOfTypestring - - null, int, float, string, bool, object, array
  • $handlercallable - (mixed $value) -> mixed
onClassSerialize($className, $handler = null)
Параметры:
  • $classNamestring
  • $handlercallable