Add a property to a JSON object or array. * @param obj The handler of the JSON object or array. * @param property The handler of the property to be added. */
| 313 | * @param obj The handler of the JSON object or array. |
| 314 | * @param property The handler of the property to be added. */ |
| 315 | static void add( json_t* obj, json_t* property ) { |
| 316 | property->sibling = 0; |
| 317 | if ( !obj->u.c.child ){ |
| 318 | obj->u.c.child = property; |
| 319 | obj->u.c.last_child = property; |
| 320 | } else { |
| 321 | obj->u.c.last_child->sibling = property; |
| 322 | obj->u.c.last_child = property; |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | /** Parser a string to get a json object value. |
| 327 | * @param str Pointer to first character. |
no outgoing calls
no test coverage detected