* include/hbjson.h
* src/rtl/hbjson.c
+ added new C function:
char * hb_jsonEncodeCP( PHB_ITEM pValue, HB_SIZE * pnLen,
HB_BOOL fHuman, PHB_CODEPAGE cdp );
It allows to pass explicitly codepage in which strings inside pValue
are encoded. If cdp parameter is not NULL then it's used to extract
unicode character values from passed strings and this values is used
to encode to encode non ASCII characters as "\uXXXX" where XXXX is
unicode character value. Data serialized in such way is 7bit clean.
If this parameter is NULL then strings are encoded in raw form just
like in hb_jsonEncode().
+ added new C function:
HB_SIZE hb_jsonDecodeCP( const char * szSource, PHB_ITEM pValue,
PHB_CODEPAGE cdp );
It allows to pass explicitly codepage used for strings decoded from
JSON data. If this parameter is NULL then strings are decoded in raw
form and unicode character with code over 255 are converted to '?'
char.
+ added optional 3-rd parameter with codepage ID to PRG functions
hb_jsonEncode() and hb_jsonDecode(). If this parameter is not given
then above functions works like before this modification:
hb_jsonEncode() uses raw string encoding and hb_jsonDecode() uses
current HVM CP to decode characters encoded as \uXXXX.
+ modified PRG function hb_jsonDecode() to return decoded data
instead of length of decoded data when second parameter is not
passed by reference.