struct json_object* jobj = json_object_new_object();
ctr_internal_object_set_property(
jsonObjectInstance,
ctr_build_string_from_cstring( "_pointer" ),
ctr_build_number_from_float((long) jobj),
CTR_CATEGORY_PRIVATE_PROPERTY
);
/**
* @internal
*
* Converts ctr_object pointer to a json pointer
**/
struct json_object* ctr_json_internal_jsonptr(ctr_object* co) {
return (struct json_object*) (long) co->value.nvalue;
}
ctr_object* jobjPtrProp;
jobjPtrProp = ctr_internal_object_find_property(
myself,
ctr_build_string_from_cstring( "_pointer" ),
CTR_CATEGORY_PRIVATE_PROPERTY
);
json_object_object_add(ctr_json_internal_jsonptr(jobjPtrProp),
(const char*) key,
json_object_new_string((const char*) val)
);