JsonEvent

A JSON event emited by the @see \io\vertx\jphp\core\parsetools\JsonParser.

package

Default

Methods

__construct

__construct() 

arrayValue

arrayValue() : array

Response

array

the JSON array value or {@code null} if the event has no JSON value

Return the binary value.

binaryValue() : \io\vertx\jphp\core\buffer\Buffer

JSON itself has no notion of a binary, this extension complies to the RFC-7493, so this method assumes there is a String value with the key and it contains a Base64 encoded binary, which it decodes if found and returns.

Response

\io\vertx\jphp\core\buffer\Buffer

the binary value or {@code null} if the event has no JSON value

booleanValue

booleanValue() : boolean

Response

boolean

the {@code Boolean} value or {@code null} if the event has no JSON value

doubleValue

doubleValue() : float

Response

float

the {@code Double} value or {@code null} if the event has no JSON value

fieldName

fieldName() : string

Response

string

the name of the field when the event is emitted as a JSON object member

floatValue

floatValue() : float

Response

float

the {@code Float} value or {@code null} if the event has no JSON value

integerValue

integerValue() : integer

Response

integer

the {@code Integer} value or {@code null} if the event has no JSON value

isArray

isArray() : boolean

Response

boolean

true when the JSON value is a JSON array

isBoolean

isBoolean() : boolean

Response

boolean

true when the JSON value is a boolean

isNull

isNull() : boolean

Response

boolean

true when the JSON value is null

isNumber

isNumber() : boolean

Response

boolean

true when the JSON value is a number

isObject

isObject() : boolean

Response

boolean

true when the JSON value is a JSON object

isString

isString() : boolean

Response

boolean

true when the JSON value is a string

longValue

longValue() : integer

Response

integer

the {@code Long} value or {@code null} if the event has no JSON value

Decodes and returns the current value as the specified <code>type</code>.

mapTo( $arg0) : mixed

Arguments

$arg0

string

Response

mixed

the decoded value

objectValue

objectValue() : array

Response

array

the JSON object value or {@code null} if the event has no JSON value

stringValue

stringValue() : string

Response

string

the string value or {@code null} if the event has no JSON value

type

type() : string

Response

string

the type of the event

value

value() : mixed

Response

mixed

the json value for {@link JsonEventType#VALUE} events