load_from_data


Description:

public bool load_from_data (string data, ssize_t length = -1) throws Error

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.

Parameters:

this

a parser

data

the buffer to parse

length

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

Returns:

`TRUE` if the buffer was succesfully parsed