| 3 | #include <engine/shared/json.h> |
| 4 | |
| 5 | const 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 | |
| 19 | const struct _json_value *json_array_get(const json_value *pArray, int Index) |
| 20 | { |