Parser.loadFromData

Loads a JSON stream from a buffer and parses it.

You can call this function multiple times with the same parser, but the contents of the parser will be destroyed each time.

class Parser
bool
loadFromData
(
string data
,
ptrdiff_t length
)

Parameters

data string

the buffer to parse

length ptrdiff_t

the length of the buffer, or -1 if it is NUL terminated

Return Value

Type: bool

TRUE if the buffer was succesfully parsed