Class JsonVisitor
Location visitor used to marshal JSON response data into a formatted array.
Allows top level JSON parameters to be inserted into the result of a command. The top level attributes are grabbed from the response's JSON data using the name value by default. Filters can be applied to parameters as they are traversed. This allows data to be normalized before returning it to users (for example converting timestamps to DateTime objects).
- Guzzle\Service\Command\LocationVisitor\Response\AbstractResponseVisitor implements Guzzle\Service\Command\LocationVisitor\Response\ResponseVisitorInterface
- Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor
Located at src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php
public
|
#
before(
Called before visiting all parameters. This can be used for seeding the result of a command with default data (e.g. populating with JSON data in the response then adding to the parsed data). |
public
|
#
visit(
Called once for each parameter being visited that matches the location type |
protected
|
#
recursiveProcess(
Recursively process a parameter while applying filters |
after()
|