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:
parent
7b2b11e932
commit
1fd83d9314
30 changed files with 985 additions and 751 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue