summaryrefslogtreecommitdiff
path: root/json-glib/json-value.c
Commit message (Collapse)AuthorAgeFilesLines
* Update the node documentationEmmanuele Bassi2021-06-101-6/+4
|
* docs: Fix the Since tagsEmmanuele Bassi2016-03-011-1/+1
| | | | The newly added API is available since 1.2.
* core: Add JSON node, object, array hashesPhilip Withnall2016-03-011-0/+45
| | | | | | | | | | | | | | | | | | | Now that these objects can be marked as immutable, it is possible to calculate and cache hash values for each of them. This allows efficient hash-based deduplication of large numbers of JSON nodes, as needed by Walbottle for JSON test vector generation. To complement the new hash functions, each of JsonNode, JsonValue, JsonObject and JsonArray also now have an equal() comparison method. This compares them structurally and recursively, using the definition of equality from the JSON Schema specification, which seems as good as any other. http://json-schema.org/latest/json-schema-core.html#anchor9 https://bugzilla.gnome.org/show_bug.cgi?id=756121 Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* core: Add immutability support to core objectsPhilip Withnall2016-03-011-0/+23
| | | | | | | | | | | Add an immutable mode to JsonNode, JsonObject, JsonArray and JsonValue. This is an optional mode which objects enter by calling json_*_seal(). It is a one-way transition, which means that we can build and manipulate objects as much as desired, before sealing them and enjoying the benefits of immutable objects: no need to take copies when handling them, persistent hash values (still to be implemented). https://bugzilla.gnome.org/show_bug.cgi?id=756121
* core: Remove atomic operations for reference countingPhilip Withnall2016-01-281-2/+2
| | | | They are not needed — json-glib is not at all thread safe.
* Remove conditional inclusion of config.hEmmanuele Bassi2014-03-181-2/+0
| | | | All the platforms and build system we support have a config.h header.
* Add JsonValueEmmanuele Bassi2012-06-301-0/+216
Given its ECMAScript inheritance, JSON allows only four types of values: - integer numbers - floating point numbers - booleans - strings We can efficiently represent a JSON value using a simple, reference counted structure, that behaves similarly to GValue but without the baggage of the whole type system. For the time being, we should keep the whole JsonValue internal: we already specify typed public accessors, so there's no need to complicate the API any further.