SDK Json Parser API documentation

Version: stable

FUNCTION
dmJson::Free()

deallocates json document

dmJson::Parse()

parse json data

dmJson::Parse()

parse json data

ENUMS
dmJson::Result

result enumeration

dmJson::Type

token type enumeration

Functions

dmJson::Free()

dmJson::Free(document)

Deallocates a previously created dmJson::Document

PARAMETERS

document

dmJson::Document* The document


dmJson::Parse()

dmJson::Parse(buffer,buffer_length,document)

Parses an (utf-8) string into a dmJson::Document The document must later be freed with dmJson::Free()

PARAMETERS

buffer

const char* The input data (Utf-8)

buffer_length

uint32_t The size of the json buffer (in bytes)

document

dmJson::Document* The output document

RETURNS

dmJson::RESULT_OK

on success


dmJson::Parse()

dmJson::Parse(buffer,document)

Parses a null terminated (utf-8) string into a dmJson::Document The document must later be freed with dmJson::Free()

PARAMETERS

buffer

const char* The input data (Utf-8)

document

dmJson::Document* The output document

RETURNS

dmJson::RESULT_OK

on success


Enums

dmJson::Result

result enumeration

Result enumeration.

dmJson::RESULT_OK
dmJson::RESULT_SYNTAX_ERROR
dmJson::RESULT_INCOMPLETE
dmJson::RESULT_UNKNOWN

dmJson::Type

token type enumeration

Token type enumeration.

dmJson::TYPE_PRIMITIVE

Number or boolean

dmJson::TYPE_OBJECT

Json object

dmJson::TYPE_ARRAY

Json array

dmJson::TYPE_STRING

String