19 #define AFW_IMPLEMENTATION_ID AFW_JSON_Q_CONTENT_TYPE_SHORT
42 static const afw_memory_t impl_raw_last_object_separator = {
56 &impl_afw_content_type_inf,
67 return &impl_afw_content_type;
82 impl_afw_content_type_raw_to_value(
90 source_location, p, xctx);
99 impl_afw_content_type_raw_to_object(
127 adaptor_id, object_type_id, object_id,
true, p, xctx);
136 impl_afw_content_type_write_value(
144 afw_json_internal_write_value(value, options, context, callback,
154 impl_afw_content_type_create_object_list_writer(
161 return afw_content_type_impl_create_object_list_writer(
162 instance, options, context, callback,
163 &impl_raw_begin_object_list,
164 &impl_raw_object_separator,
165 &impl_raw_last_object_separator,
166 &impl_raw_end_object_list,
AFW_DEFINE(const afw_object_t *)
Interface afw_interface implementation declares.
Adaptive Framework Core Internal.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
unsigned char afw_octet_t
8 bits (unsigned).
afw_size_t(* afw_write_cb_t)(void *context, const void *buffer, afw_size_t size, const afw_pool_t *p, afw_xctx_t *xctx)
Typedef for write callback function.
afw_content_type_register(const afw_content_type_t *content_type, afw_xctx_t *xctx)
Register content type with its id and all of its media types.
#define afw_json_to_value(json, source_location, p, xctx)
Convert JSON to an adaptive value.
void afw_json_register(afw_xctx_t *xctx)
Register JSON support.
#define afw_json_to_object_with_meta(string, source_location, adaptor_id, object_type_id, object_id, cede_p, p, xctx)
Compile json string to adaptive object with meta.
afw_json_content_type_get()
Get the content type instance for json.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
const afw_utf8_t * afw_utf8_from_raw(const afw_memory_t *raw, const afw_pool_t *p, afw_xctx_t *xctx)
Convert raw to a utf-8 NFC normalizing if necessary in specified pool.
Interface afw_content_type_object_list_writer public struct.
Interface afw_content_type public struct.
Struct for memory pointer and size.
Struct for object processing options.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
Interface afw_xctx public struct.