osrtjson.h File Reference
JSON low-level C encode/decode functions. More...
#include "rtxsrc/osMacros.h"
#include "rtxsrc/osSysTypes.h"
#include "rtxsrc/rtxCommon.h"
#include "rtxsrc/rtxError.h"
#include "rtxsrc/rtxBuffer.h"
#include "rtxsrc/rtxMemory.h"
#include "rtjsonsrc/rtJsonExternDefs.h"
Go to the source code of this file.
Defines | |
#define | OSUPCASE 0x00008000 |
The upper-case flag: if set, hex strings will be encoded in upper case. | |
Functions | |
EXTERNJSON int | rtJsonEncAnyAttr (OSCTXT *pctxt, const OSRTDList *pvalue) |
This function encodes a list of OSAnyAttr attributes in which the name and value are given as a UTF-8 string. | |
EXTERNJSON int | rtJsonEncIntValue (OSCTXT *pctxt, OSINT32 value) |
This function encodes a variable of the XSD integer type. | |
EXTERNJSON int | rtJsonEncInt64Value (OSCTXT *pctxt, OSINT64 value) |
This function encodes a variable of the XSD integer type. | |
EXTERNJSON int | rtJsonEncBase64StrValue (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value) |
This function encodes a variable of the XSD base64Binary type. | |
EXTERNJSON int | rtJsonEncBoolValue (OSCTXT *pctxt, OSBOOL value) |
This function encodes a variable of the XSD boolean type. | |
EXTERNJSON int | rtJsonEncGYear (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric gYear value into a JSON string representation. | |
EXTERNJSON int | rtJsonEncGYearMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric gYearMonth value into a JSON string representation. | |
EXTERNJSON int | rtJsonEncGMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric gMonth value into a JSON string representation. | |
EXTERNJSON int | rtJsonEncGMonthDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric gMonthDay value into a JSON string representation. | |
EXTERNJSON int | rtJsonEncGDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric gDay value into a JSON string representation. | |
EXTERNJSON int | rtJsonEncDate (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a variable of the XSD 'date' type as a string. | |
EXTERNJSON int | rtJsonEncTime (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a variable of the XSD 'time' type as a JSON string. | |
EXTERNJSON int | rtJsonEncDateTime (OSCTXT *pctxt, const OSXSDDateTime *pvalue) |
This function encodes a numeric date/time value into a string representation. | |
EXTERNJSON int | rtJsonEncDecimalValue (OSCTXT *pctxt, OSREAL value, const OSDecimalFmt *pFmtSpec) |
This function encodes a value of the XSD decimal type. | |
EXTERNJSON int | rtJsonEncDoubleValue (OSCTXT *pctxt, OSREAL value, const OSDoubleFmt *pFmtSpec) |
This function encodes a value of the XSD double or float type. | |
EXTERNJSON int | rtJsonEncFloatValue (OSCTXT *pctxt, OSREAL value, const OSDoubleFmt *pFmtSpec) |
This function encodes a variable of the XSD float type. | |
EXTERNJSON int | rtJsonEncHexStr (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *data) |
This function encodes a variable of the XSD hexBinary type. | |
EXTERNJSON int | rtJsonEncBitStrValue (OSCTXT *pctxt, OSUINT32 nbits, const OSOCTET *data) |
This function encodes a variable of the ASN.1 Bit string type. | |
EXTERNJSON int | rtJsonEncIndent (OSCTXT *pctxt) |
This function adds indentation whitespace to the output stream. | |
EXTERNJSON int | rtJsonEncStringObject (OSCTXT *pctxt, const OSUTF8CHAR *name, const OSUTF8CHAR *value) |
This function encodes a JSON object containing a string value. | |
EXTERNJSON int | rtJsonEncStringObject2 (OSCTXT *pctxt, const OSUTF8CHAR *name, size_t nameLen, const OSUTF8CHAR *value, size_t valueLen) |
This function encodes a JSON object containing a string value. | |
EXTERNJSON int | rtJsonEncStringPair (OSCTXT *pctxt, const OSUTF8CHAR *name, const OSUTF8CHAR *value) |
This function encodes a name/value pair. | |
EXTERNJSON int | rtJsonEncStringPair2 (OSCTXT *pctxt, const OSUTF8CHAR *name, size_t nameLen, const OSUTF8CHAR *value, size_t valueLen) |
This function encodes a name/value pair. | |
EXTERNJSON int | rtJsonEncStringValue (OSCTXT *pctxt, const OSUTF8CHAR *value) |
This function encodes a variable of the XSD string type. | |
EXTERNJSON int | rtJsonEncStringValue2 (OSCTXT *pctxt, const OSUTF8CHAR *value, size_t valueLen) |
This function encodes a variable of the XSD string type. | |
EXTERNJSON int | rtJsonEncUnicodeData (OSCTXT *pctxt, const OSUNICHAR *value, OSUINT32 nchars) |
This function encodes a variable of Unicode value. | |
EXTERNJSON int | rtJsonEncUCS4Data (OSCTXT *pctxt, const OS32BITCHAR *value, OSUINT32 nchars) |
This function encodes a variable of UCS-4 value. | |
EXTERNJSON int | rtJsonEncUIntValue (OSCTXT *pctxt, OSUINT32 value) |
This function encodes a variable of the XSD unsigned integer type. | |
EXTERNJSON int | rtJsonEncUInt64Value (OSCTXT *pctxt, OSUINT64 value) |
This function encodes a variable of the XSD integer type. | |
EXTERNJSON int | rtJsonDecAnyElem (OSCTXT *pctxt, OSUTF8CHAR **ppvalue) |
This function decodes an arbitrary block of JSON-encoded data into a string variable. | |
EXTERNJSON int | rtJsonDecAnyType (OSCTXT *pctxt, OSUTF8CHAR **ppvalue) |
This function decodes an arbitrary block of JSON-encoded data into a string variable. | |
EXTERNJSON int | rtJsonDecBase64Str (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, size_t bufsize) |
This function decodes a contents of a Base64-encode binary string into a static memory structure. | |
EXTERNJSON int | rtJsonDecDynBase64Str (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a Base64-encode binary string. | |
EXTERNJSON int | rtJsonDecBool (OSCTXT *pctxt, OSBOOL *pvalue) |
This function decodes a variable of the boolean type. | |
EXTERNJSON int | rtJsonDecDate (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'date' type. | |
EXTERNJSON int | rtJsonDecTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'time' type. | |
EXTERNJSON int | rtJsonDecDateTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'dateTime' type. | |
EXTERNJSON int | rtJsonDecGYear (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYear' type. | |
EXTERNJSON int | rtJsonDecGYearMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYearMonth' type. | |
EXTERNJSON int | rtJsonDecGMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonth' type. | |
EXTERNJSON int | rtJsonDecGMonthDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonthDay' type. | |
EXTERNJSON int | rtJsonDecGDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gDay' type. | |
EXTERNJSON int | rtJsonDecDecimal (OSCTXT *pctxt, OSREAL *pvalue, int totalDigits, int fractionDigits) |
This function decodes the contents of a decimal data type. | |
EXTERNJSON int | rtJsonDecDouble (OSCTXT *pctxt, OSREAL *pvalue) |
This function decodes the contents of a float or double data type. | |
EXTERNJSON int | rtJsonDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, size_t bufsize) |
This function decodes the contents of a hexBinary string into a static memory structure. | |
EXTERNJSON int | rtJsonDecDynHexStr (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a hexBinary string. | |
EXTERNJSON int | rtJsonDecDynBitStr (OSCTXT *pctxt, OSUINT32 *nbits, OSOCTET **data) |
This function decodes a variable of the ASN.1 Bit string type. | |
EXTERNJSON int | rtJsonDecBitStrValue (OSCTXT *pctxt, OSUINT32 *nbits, OSOCTET *data) |
This function decodes a variable of the ASN.1 Bit string type. | |
EXTERNJSON int | rtJsonDecInt8Value (OSCTXT *pctxt, OSINT8 *pvalue) |
This function decodes the contents of an 8-bit integer data type (i.e. | |
EXTERNJSON int | rtJsonDecInt16Value (OSCTXT *pctxt, OSINT16 *pvalue) |
This function decodes the contents of a 16-bit integer data type. | |
EXTERNJSON int | rtJsonDecInt32Value (OSCTXT *pctxt, OSINT32 *pvalue) |
This function decodes the contents of a 32-bit integer data type. | |
EXTERNJSON int | rtJsonDecInt64Value (OSCTXT *pctxt, OSINT64 *pvalue) |
This function decodes the contents of a 64-bit integer data type. | |
EXTERNJSON int | rtJsonDecUInt8Value (OSCTXT *pctxt, OSUINT8 *pvalue) |
This function decodes the contents of an unsigned 8-bit integer data type (i.e. | |
EXTERNJSON int | rtJsonDecUInt16Value (OSCTXT *pctxt, OSUINT16 *pvalue) |
This function decodes the contents of an unsigned 16-bit integer data type. | |
EXTERNJSON int | rtJsonDecUInt32Value (OSCTXT *pctxt, OSUINT32 *pvalue) |
This function decodes the contents of an unsigned 32-bit integer data type. | |
EXTERNJSON int | rtJsonDecUInt64Value (OSCTXT *pctxt, OSUINT64 *pvalue) |
This function decodes the contents of an unsigned 64-bit integer data type. | |
EXTERNJSON int | rtJsonDecMatchChar (OSCTXT *pctxt, OSUTF8CHAR ch) |
This function parses the next byte and matches it with given character. | |
EXTERNJSON int | rtJsonDecMatchObjectStart (OSCTXT *pctxt, const OSUTF8NameAndLen *nameArray, size_t numNames) |
This function parses the next object start tag that matches with one of the names in the given name array. | |
EXTERNJSON int | rtJsonDecMatchToken (OSCTXT *pctxt, const OSUTF8CHAR *token) |
This function decodes a JSON string and matches with a given token. | |
EXTERNJSON int | rtJsonDecMatchToken2 (OSCTXT *pctxt, const OSUTF8CHAR *token, size_t tokenLen) |
This function decodes a JSON string and matches with a given token. | |
EXTERNJSON int | rtJsonDecNameValuePair (OSCTXT *pctxt, OSUTF8NVP *pvalue) |
This function decodes a name/value pair. | |
EXTERNJSON int | rtJsonDecPeekChar (OSCTXT *pctxt, OSUTF8CHAR *pch) |
This function read the next character. | |
EXTERNJSON char | rtJsonDecPeekChar2 (OSCTXT *pctxt) |
This function read the next character. | |
EXTERNJSON int | rtJsonDecStringObject (OSCTXT *pctxt, const OSUTF8CHAR *name, OSUTF8CHAR **ppvalue) |
This function decodes the contents of a JSON object containing a character string. | |
EXTERNJSON int | rtJsonDecStringValue (OSCTXT *pctxt, OSUTF8CHAR **ppvalue) |
This function decodes the contents of a string data type. | |
EXTERNJSON int | rtJsonDecXmlStringValue (OSCTXT *pctxt, OSXMLSTRING *pvalue) |
This function decodes the contents of an XML string data type. | |
EXTERNJSON size_t | rtJsonGetElemIdx (OSCTXT *pctxt, const OSUTF8NameAndLen nameArray[], size_t nrows) |
This function parses the next start tag and finds the index of the element name in the descriptor table. |
Detailed Description
JSON low-level C encode/decode functions.
Definition in file osrtjson.h.
Define Documentation
#define OSUPCASE 0x00008000 |
The upper-case flag: if set, hex strings will be encoded in upper case.
Definition at line 90 of file osrtjson.h.