|
Objectively
Ultra-lightweight object oriented framework for GNU C.
|
Standard JSONSerializer and JSONDeserializer functions for C struct fields. More...
#include <stddef.h>#include <stdint.h>#include <Objectively/Array.h>#include <Objectively/Date.h>#include <Objectively/Dictionary.h>#include <Objectively/Set.h>#include <Objectively/Object.h>#include <Objectively/URL.h>Go to the source code of this file.
Data Structures | |
| struct | JSONArrayProperties |
| Describes the JSON binding for an inline array field of a C struct. More... | |
| struct | JSONProperties |
| Describes the JSON binding for all fields of a C struct. More... | |
| struct | JSONProperty |
| Describes the JSON binding strategy for a single field of a C struct. More... | |
Macros | |
| #define | JSONArrayProperties_NoCount ((ptrdiff_t) -1) |
| Sentinel for JSONArrayProperties::count indicating no sibling count field. | |
| #define | MakeJSONArrayProperties(properties, capacity, count) &(JSONArrayProperties){ .properties = (properties), .capacity = (capacity), .count = (count) } |
| Creates a pointer to a JSONArrayProperties compound literal. | |
| #define | MakeJSONProperties(Struct, ...) |
| Creates a JSONProperties descriptor for a C struct type. | |
| #define | MakeJSONProperty(Struct, field, serializer_, deserializer_, data_) |
| Creates a JSONProperty for a named field of a struct, deriving offset automatically. | |
Typedefs | |
| typedef bool(* | JSONDeserializer) (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
| Deserializes a JSON value into a C struct field. | |
| typedef ident(* | JSONSerializer) (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
| Serializes a C struct field to an Objectively Object. | |
Functions | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeArray (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
| Deserializes a JSON array into an inline array field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeBoole (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON boolean into a bool field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeCharacters (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON string into a fixed-size char[] field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeCString (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON string into a heap-allocated char * field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeDate (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON string into a Date * field (ISO 8601 by default). | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeDictionary (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON object into a Dictionary * field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeDouble (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into a double field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeFloat (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into a float field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeInt32 (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into an int32_t field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeInt64 (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into an int64_t field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeObjectArray (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON array into an Array * field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeSet (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON array into a Set * field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeString (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON string into a String * field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeStruct (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
| Deserializes a JSON object into a nested struct field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeUint32 (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into a uint32_t field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeUint64 (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON number into a uint64_t field. | |
| OBJECTIVELY_EXPORT bool | JSONDeserializeURL (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON string into a URL * field via initWithString. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeArray (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
| Serializes an inline array field to a JSON array. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeBoole (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a bool field to a JSON boolean. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeCharacters (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a fixed-size char[] field to a JSON string. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeCString (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a char * heap string field to a JSON string. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeDate (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a Date * field to a JSON string (ISO 8601 by default). | |
| OBJECTIVELY_EXPORT ident | JSONSerializeDictionary (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a Dictionary * field to a JSON object. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeDouble (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a double field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeFloat (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a float field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeInt32 (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes an int32_t field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeInt64 (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes an int64_t field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeObjectArray (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes an Array * field to a JSON array. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeSet (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a Set * field to a JSON array. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeString (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a String * field to a JSON string. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeStruct (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
| Serializes a nested struct field to a JSON object. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeUint32 (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a uint32_t field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeUint64 (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a uint64_t field to a JSON number. | |
| OBJECTIVELY_EXPORT ident | JSONSerializeURL (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a URL * field to a JSON string (the URL's string form). | |
Standard JSONSerializer and JSONDeserializer functions for C struct fields.
Definition in file JSONSerializers.h.
| #define JSONArrayProperties_NoCount ((ptrdiff_t) -1) |
Sentinel for JSONArrayProperties::count indicating no sibling count field.
Definition at line 399 of file JSONSerializers.h.
| #define MakeJSONArrayProperties | ( | properties, | |
| capacity, | |||
| count | |||
| ) | &(JSONArrayProperties){ .properties = (properties), .capacity = (capacity), .count = (count) } |
Creates a pointer to a JSONArrayProperties compound literal.
Use this macro (rather than a raw compound literal) as the data argument to MakeJSONProperty when binding a JSONDeserializeArray/JSONSerializeArray property inline. A raw (JSONArrayProperties){ ... } literal cannot be used directly as a macro argument because the preprocessor does not track brace depth; its commas would split macro arguments.
Definition at line 431 of file JSONSerializers.h.
| #define MakeJSONProperties | ( | Struct, | |
| ... | |||
| ) |
Creates a JSONProperties descriptor for a C struct type.
Definition at line 155 of file JSONSerializers.h.
| #define MakeJSONProperty | ( | Struct, | |
| field, | |||
| serializer_, | |||
| deserializer_, | |||
| data_ | |||
| ) |
Creates a JSONProperty for a named field of a struct, deriving offset automatically.
The JSON key is the stringified field name.
Definition at line 142 of file JSONSerializers.h.
| typedef bool(* JSONDeserializer) (const JSONProperties *properties, const JSONProperty *property, const Object *value, ident field, JSONContext *context) |
Deserializes a JSON value into a C struct field.
| properties | The JSONProperties of the containing struct. |
| property | The JSONProperty for this field. |
| value | The parsed JSON Object; guaranteed non-NULL at the call site. |
| field | Pointer to the destination field within the struct instance. |
| context | The active JSONContext, for nested deserialization and error reporting. |
true on success; false on type mismatch. Definition at line 74 of file JSONSerializers.h.
| typedef ident(* JSONSerializer) (const JSONProperties *properties, const JSONProperty *property, ident value, ident data, JSONContext *context) |
Serializes a C struct field to an Objectively Object.
| properties | The JSONProperties of the containing struct. |
| property | The JSONProperty for this field. |
| value | Pointer to the field within the struct instance. |
| data | Opaque user data from property->data. |
| context | The active JSONContext, for nested serialization and error reporting. |
Definition at line 59 of file JSONSerializers.h.
| OBJECTIVELY_EXPORT bool JSONDeserializeArray | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON array into an inline array field.
property->data must point to a JSONArrayProperties.
false if the JSON value is not an Array. Definition at line 501 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeBoole | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON boolean into a bool field.
false if the JSON value is not a Boole. Definition at line 454 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeCharacters | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON string into a fixed-size char[] field.
property->data must carry the field size via JSONFieldSize.
false if the JSON value is not a String. Definition at line 251 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeCString | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON string into a heap-allocated char * field.
The existing pointer is freed before replacement.
false if the JSON value is not a String. Definition at line 278 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeDate | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON string into a Date * field (ISO 8601 by default).
Pass a const char * format string as property->data to override the format.
false if the JSON value is not a String or cannot be parsed. Definition at line 632 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeDictionary | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON object into a Dictionary * field.
The existing Dictionary is released before replacement.
false if the JSON value is not a Dictionary. Definition at line 753 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeDouble | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into a double field.
false if the JSON value is not a Number. Definition at line 429 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeFloat | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into a float field.
false if the JSON value is not a Number. Definition at line 404 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeInt32 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into an int32_t field.
false if the JSON value is not a Number. Definition at line 304 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeInt64 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into an int64_t field.
JSON numbers are IEEE 754 doubles (53-bit mantissa). Values beyond 2^53 will lose precision on round-trip.
false if the JSON value is not a Number. Definition at line 354 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeObjectArray | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON array into an Array * field.
The existing Array is released before replacement. Elements are retained as their parsed Objectively types (String, Number, Boole, etc.).
false if the JSON value is not an Array. Definition at line 671 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeSet | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON array into a Set * field.
The existing Set is released before replacement.
false if the JSON value is not an Array. Definition at line 714 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeString | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON string into a String * field.
The existing String is released before replacement.
false if the JSON value is not a String. Definition at line 552 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeStruct | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON object into a nested struct field.
property->data must point to a JSONProperties describing the nested type.
false if the JSON value is not a Dictionary. Definition at line 479 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeUint32 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into a uint32_t field.
false if the JSON value is not a Number. Definition at line 329 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeUint64 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON number into a uint64_t field.
JSON numbers are IEEE 754 doubles (53-bit mantissa). Values beyond 2^53 will lose precision on round-trip.
false if the JSON value is not a Number. Definition at line 379 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT bool JSONDeserializeURL | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| const Object * | value, | ||
| ident | field, | ||
| JSONContext * | context | ||
| ) |
Deserializes a JSON string into a URL * field via initWithString.
The existing URL is released before replacement.
false if the JSON value is not a String. Definition at line 589 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeArray | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes an inline array field to a JSON array.
property->data must point to a JSONArrayProperties.
Definition at line 223 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeBoole | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a bool field to a JSON boolean.
Definition at line 188 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeCharacters | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a fixed-size char[] field to a JSON string.
Omits the key (returns NULL) when the field is empty.
Definition at line 42 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeCString | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a char * heap string field to a JSON string.
Omits the key (returns NULL) when the pointer is NULL.
Definition at line 61 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeDate | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a Date * field to a JSON string (ISO 8601 by default).
Pass a const char * format string as property->data to override the format.
Definition at line 611 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeDictionary | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a Dictionary * field to a JSON object.
Values are written as-is; each must be a JSON-compatible Objectively type.
Definition at line 738 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeDouble | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a double field to a JSON number.
Definition at line 170 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeFloat | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a float field to a JSON number.
Definition at line 152 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeInt32 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes an int32_t field to a JSON number.
Definition at line 80 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeInt64 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes an int64_t field to a JSON number.
JSON numbers are IEEE 754 doubles (53-bit mantissa). Values beyond 2^53 will lose precision on round-trip.
Definition at line 116 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeObjectArray | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes an Array * field to a JSON array.
Elements are written as-is; each must be a JSON-compatible Objectively type.
Definition at line 656 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeSet | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a Set * field to a JSON array.
Elements are written as-is; each must be a JSON-compatible Objectively type.
Definition at line 695 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeString | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
| OBJECTIVELY_EXPORT ident JSONSerializeStruct | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a nested struct field to a JSON object.
property->data must point to a JSONProperties describing the nested type.
Definition at line 206 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeUint32 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a uint32_t field to a JSON number.
Definition at line 98 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeUint64 | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |
Serializes a uint64_t field to a JSON number.
JSON numbers are IEEE 754 doubles (53-bit mantissa). Values beyond 2^53 will lose precision on round-trip.
Definition at line 134 of file JSONSerializers.c.
| OBJECTIVELY_EXPORT ident JSONSerializeURL | ( | const JSONProperties * | properties, |
| const JSONProperty * | property, | ||
| ident | value, | ||
| ident | data, | ||
| JSONContext * | context | ||
| ) |