Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
UBJParser Struct Reference

Detailed Description

The UBJSON parser parses a binary UBJSON stream and calls the UBJPIntf callback interface for each parsed object/primitive type.

Note
This implementation may not match the latest UBJSON specification. Specification compatibility is reserved for a separate review. The contracts here describe the current implementation, not a conformance certification.

Only object/array roots are supported. String payloads must be UTF-8; the parser does not validate this encoding. High-precision H values are delivered as raw text for the application to interpret or reject.

See also
UBJVal
JParser

#include <ubjson.h>

Public Member Functions

 UBJParser (UBJPIntf *intf, char *name, int memberNameLen, int extraStackLen=0)
 Create the callback interface object. More...
 
int parse (const U8 *buf, U32 size)
 Feed or resume parsing a top-level UBJSON object/array. More...
 
 ~UBJParser ()
 No-op destructor. More...
 
int getIndex ()
 Query the current optimized-container position. More...
 
int getCount ()
 Query the current container's declared count. More...
 
int getStatus ()