add Get????Version function of expat/jsoncpp

This commit is contained in:
hyzboy 2020-10-11 17:57:47 +08:00
parent 46bb78cefb
commit 225bf198b0
6 changed files with 20 additions and 2 deletions

@ -1 +1 @@
Subproject commit ed3484270fe45140e2d8858426472404b1f0ae6a Subproject commit 0d9b08127853c82305b4bf110f08bc3a4fbdbfa5

@ -1 +1 @@
Subproject commit a3c8642886b348d4f8fcb5384266c3a94ffe66b3 Subproject commit 5f4e10462fecdc9598fdcf20aad9558843abc212

View File

@ -4,6 +4,8 @@
namespace hgl namespace hgl
{ {
const UTF8String GetJsoncppVersion();
/** /**
* Json数据类型到普通UTF8字符串 * Json数据类型到普通UTF8字符串
*/ */

View File

@ -25,6 +25,8 @@ namespace hgl
namespace xml namespace xml
{ {
const UTF8String GetExpatVersion();
constexpr int XML_PARSE_BUFFER_SIZE=HGL_SIZE_1KB*128; ///<XML解析缓冲区大小 constexpr int XML_PARSE_BUFFER_SIZE=HGL_SIZE_1KB*128; ///<XML解析缓冲区大小
/** /**

View File

@ -9,6 +9,11 @@ using namespace std;
namespace hgl namespace hgl
{ {
const UTF8String GetJsoncppVersion()
{
return UTF8String(JSONCPP_VERSION_STRING);
}
bool JsonToString(const Json::Value &jv_root,UTF8String &str,OSString &error_info) bool JsonToString(const Json::Value &jv_root,UTF8String &str,OSString &error_info)
{ {
Json::StreamWriterBuilder builder; Json::StreamWriterBuilder builder;

View File

@ -9,6 +9,15 @@ namespace hgl
{ {
namespace xml namespace xml
{ {
const UTF8String GetExpatVersion()
{
return( UTF8String::valueOf(XML_MAJOR_VERSION)+
UTF8String(U8_TEXT("."))+
UTF8String::valueOf(XML_MINOR_VERSION)+
UTF8String(U8_TEXT("."))+
UTF8String::valueOf(XML_MICRO_VERSION));
}
namespace namespace
{ {
void XMLStartElement(ElementParse *ep,const XML_Char *name,const XML_Char **atts) void XMLStartElement(ElementParse *ep,const XML_Char *name,const XML_Char **atts)