MCPcopy Create free account
hub / github.com/ddnet/ddnet / json_object_get

Function json_object_get

src/engine/shared/json.cpp:5–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <engine/shared/json.h>
4
5const struct _json_value *json_object_get(const json_value *pObject, const char *pIndex)
6{
7 unsigned int i;
8
9 if(pObject->type != json_object)
10 return &json_value_none;
11
12 for(i = 0; i < pObject->u.object.length; ++i)
13 if(!str_comp(pObject->u.object.values[i].name, pIndex))
14 return pObject->u.object.values[i].value;
15
16 return &json_value_none;
17}
18
19const struct _json_value *json_array_get(const json_value *pArray, int Index)
20{

Callers 1

ParseUpdateMethod · 0.85

Calls 1

str_compFunction · 0.85

Tested by

no test coverage detected