JsonProcessor

php\format\JsonProcessor

extends: php\format\Processor

Class JsonProcessor

Constants


constant SERIALIZE_PRETTY_PRINT
constant DESERIALIZE_AS_ARRAYS

Methods


__construct($flags = 0)
Parameters:
  • $flagsint
parse($json)

throws php\format\ProcessorException

Parameters:
Returns:

mixed

format($value)

throws php\format\ProcessorException

Parameters:
  • $valuemixed
Returns:

string

formatTo($value, $output)

throws php\format\ProcessorException

Parameters:
onSerialize($nameOfType, $handler = null)
Parameters:
  • $nameOfTypestring - - null, int, float, string, bool, object, array
  • $handlercallable - (mixed $value) -> mixed
onClassSerialize($className, $handler = null)
Parameters:
  • $classNamestring
  • $handlercallable