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:
parent
86a7db0adb
commit
190db75835
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue