1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine code for nx_json modify the data when loads.

This commit is contained in:
winlin 2015-12-28 17:39:24 +08:00
parent 86a7db0adb
commit 190db75835

View file

@ -477,8 +477,10 @@ SrsJsonAny* SrsJsonAny::loads(char* str)
if (strlen(str) == 0) { if (strlen(str) == 0) {
return NULL; return NULL;
} }
const nx_json* o = nx_json_parse(str, 0); // TODO: copy str for nx_json modify it.
string s = str;
const nx_json* o = nx_json_parse((char*)s.data(), 0);
SrsJsonAny* json = srs_json_parse_tree_nx_json(o); SrsJsonAny* json = srs_json_parse_tree_nx_json(o);