class Json extends AbstractParser (View source)

The core parser for all JSON content.

Methods

string
__toString()

Returns an opaque string representing the object.

string
readStream(StreamInterface $stream)

Reads the contents of the stream resource.

Details

string __toString()

Returns an opaque string representing the object.

Note: Use of MD5 here is not cryptographically significant.

string readStream(StreamInterface $stream)

Reads the contents of the stream resource.

Parameters

StreamInterface $stream A PSR-7 StreamInterface which is typically returned by the getBody() method of a ResponseInterface class.

Return Value

string The raw contents of the steam resource.