27 #define JSON_DECIMAL_NO_CONVERT 0
28 #define JSON_DECIMAL_TO_DOUBLE 1
29 #define JSON_DECIMAL_TO_STRING 2
33 #define JSON_FLAG_CHECK_END 0x00000001
36 #define JSON_FLAG_ESCAPE_UNICODE 0x00000002
39 #define JSON_FLAG_APPEND_OID 0x00000004
42 #define JSON_FLAG_NOT_INIT_BSON 0x00000008
45 #define JSON_FLAG_RIGOROUS_MODE 0x00000010
48 #define JSON_FLAG_DECIMAL_TO_DOUBLE 0x00000020
51 #define JSON_FLAG_DECIMAL_TO_STRING 0x00000040
62 SDB_EXPORT
void JsonSetPrintfLog(
void (*pFun)(
const CHAR *pFunc,
69 SDB_EXPORT BOOLEAN jsonToBson (
bson *bs,
const CHAR *json_str ) ;
72 SDB_EXPORT BOOLEAN jsonToBson2 (
bson *bs,
106 SDB_EXPORT BOOLEAN json2bson(
const CHAR *pJson,
107 CJSON_MACHINE *pMachine,
133 SDB_EXPORT BOOLEAN
json2bson3(
const CHAR *pJson, CJSON_MACHINE *pMachine,
134 INT32 flags,
bson *pBson ) ;
136 SDB_EXPORT
void setJsonPrecision(
const CHAR *pFloatFmt ) ;
152 SDB_EXPORT BOOLEAN
bsonToJson ( CHAR *buffer, INT32 bufsize,
const bson *b,
153 BOOLEAN toCSV, BOOLEAN skipUndefined ) ;
169 SDB_EXPORT BOOLEAN
bsonToJson2 ( CHAR *buffer, INT32 bufsize,
const bson *b,
174 #endif // end JSTOBS__H