Lines Matching refs:o

364 	lh_table_free(jso->o.c_object);  in json_object_object_delete()
375 jso->o.c_object = lh_kchar_table_new(JSON_OBJECT_DEF_HASH_ENTRIES, in json_object_new_object()
377 if (!jso->o.c_object) in json_object_new_object()
393 return jso->o.c_object; in json_object_get_object()
406 existing_entry = lh_table_lookup_entry(jso->o.c_object, (void*)key); in json_object_object_add()
409 lh_table_insert(jso->o.c_object, strdup(key), val); in json_object_object_add()
420 return lh_table_length(jso->o.c_object); in json_object_object_length()
441 return lh_table_lookup_ex(jso->o.c_object, (void*)key, (void**)value); in json_object_object_get_ex()
451 lh_table_delete(jso->o.c_object, key); in json_object_object_del()
462 if (jso->o.c_boolean) in json_object_boolean_to_json_string()
474 jso->o.c_boolean = b; in json_object_new_boolean()
485 return jso->o.c_boolean; in json_object_get_boolean()
487 return (jso->o.c_int64 != 0); in json_object_get_boolean()
489 return (jso->o.c_double != 0); in json_object_get_boolean()
491 return (jso->o.c_string.len != 0); in json_object_get_boolean()
505 return sprintbuf(pb, "%"PRId64, jso->o.c_int64); in json_object_int_to_json_string()
514 jso->o.c_int64 = i; in json_object_new_int()
526 cint64 = jso->o.c_int64; in json_object_get_int()
534 if (json_parse_int64(jso->o.c_string.str, &cint64) != 0) in json_object_get_int()
549 return (int32_t)jso->o.c_double; in json_object_get_int()
551 return jso->o.c_boolean; in json_object_get_int()
563 jso->o.c_int64 = i; in json_object_new_int64()
576 return jso->o.c_int64; in json_object_get_int64()
578 return (int64_t)jso->o.c_double; in json_object_get_int64()
580 return jso->o.c_boolean; in json_object_get_int64()
582 if (json_parse_int64(jso->o.c_string.str, &cint) == 0) in json_object_get_int64()
603 if(isnan(jso->o.c_double)) in json_object_double_to_json_string()
605 else if(isinf(jso->o.c_double)) in json_object_double_to_json_string()
606 if(jso->o.c_double > 0) in json_object_double_to_json_string()
611 size = snprintf(buf, sizeof(buf), "%.17g", jso->o.c_double); in json_object_double_to_json_string()
639 jso->o.c_double = d; in json_object_new_double()
682 return jso->o.c_double; in json_object_get_double()
684 return jso->o.c_int64; in json_object_get_double()
686 return jso->o.c_boolean; in json_object_get_double()
689 cdouble = strtod(jso->o.c_string.str,&errPtr); in json_object_get_double()
692 if (errPtr == jso->o.c_string.str) in json_object_get_double()
732 json_escape_str(pb, jso->o.c_string.str, jso->o.c_string.len); in json_object_string_to_json_string()
739 free(jso->o.c_string.str); in json_object_string_delete()
750 jso->o.c_string.str = strdup(s); in json_object_new_string()
751 if (!jso->o.c_string.str) in json_object_new_string()
757 jso->o.c_string.len = strlen(s); in json_object_new_string()
768 jso->o.c_string.str = (char*)malloc(len + 1); in json_object_new_string_len()
769 if (!jso->o.c_string.str) in json_object_new_string_len()
775 memcpy(jso->o.c_string.str, (void *)s, len); in json_object_new_string_len()
776 jso->o.c_string.str[len] = '\0'; in json_object_new_string_len()
777 jso->o.c_string.len = len; in json_object_new_string_len()
788 return jso->o.c_string.str; in json_object_get_string()
801 return jso->o.c_string.len; in json_object_get_string_len()
859 array_list_free(jso->o.c_array); in json_object_array_delete()
870 jso->o.c_array = array_list_new(&json_object_array_entry_free); in json_object_new_array()
881 return jso->o.c_array; in json_object_get_array()
889 array_list_sort(jso->o.c_array, sort_fn); in json_object_array_sort()
894 return array_list_length(jso->o.c_array); in json_object_array_length()
899 return array_list_add(jso->o.c_array, val); in json_object_array_add()
905 return array_list_put_idx(jso->o.c_array, idx, val); in json_object_array_put_idx()
911 return (struct json_object*)array_list_get_idx(jso->o.c_array, idx); in json_object_array_get_idx()