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

refine the order.

This commit is contained in:
winlin 2015-09-17 13:36:02 +08:00
parent 7b2b11e932
commit 1fd83d9314
30 changed files with 985 additions and 751 deletions

View file

@ -487,6 +487,36 @@ SrsJsonAny* SrsJsonObject::ensure_property_boolean(string name)
return prop;
}
SrsJsonAny* SrsJsonObject::ensure_property_object(string name)
{
SrsJsonAny* prop = get_property(name);
if (!prop) {
return NULL;
}
if (!prop->is_object()) {
return NULL;
}
return prop;
}
SrsJsonAny* SrsJsonObject::ensure_property_array(string name)
{
SrsJsonAny* prop = get_property(name);
if (!prop) {
return NULL;
}
if (!prop->is_array()) {
return NULL;
}
return prop;
}
SrsJsonArray::SrsJsonArray()
{
marker = SRS_JSON_Array;