summaryrefslogtreecommitdiff
path: root/json-glib/json-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Move data types ctors and setters into the public headersEmmanuele Bassi2007-10-011-35/+0
| | | | | | | Now that we are providing a generator class we need to provide the constructors and setters for JsonNode, JsonObject and JsonArray. This also means that the json-private.h header is now useless, so we can remove it from the build and repository.
* Declare json_node_take_object() and json_node_take_array()Emmanuele Bassi2007-10-011-0/+4
| | | | | | | JsonParser uses the take variant of JsonNode setters for objects and arrays since it's the one creating the objects. This way, we avoid leaks and the extra complexity of unreffing the newly created complex containers after setting them into the JsonNodes.
* Add JsonNode, a generic container for JSON typesEmmanuele Bassi2007-10-011-20/+18
| | | | | | | | | | | | | | | | | This huge commit removes JsonData and adds JsonNode, the generic container for fundamental and complex data types extracted from a JSON stream. The contents of a JsonNode can be extracted from it in form of a GValue for fundamental types (integers, floats, strings, booleans) or in form of JsonObject and JsonArray objects. JsonObject and JsonArray now accept JsonNodes instead of GValues. The JsonParser object builds the data model tree when parsing a JSON stream; the tree can be recursed by getting the root node and walking it using the GValue API for the fundamental types and the objects/arrays API for complex types. The API has been updated and the tests now recurse through the generated data model tree.
* Add JsonData, an opaque container for JSON data typesEmmanuele Bassi2007-09-211-0/+7
| | | | | | | JsonData is like GValue, but it stores JSON data types (objects and arrays) and allows us to retrieve them safely. This way we can actually know the type of the objects returned by the parser and by the other object walking functions.
* Initial import of JSON-GLibEmmanuele Bassi2007-09-201-0/+26
JSON-GLib is a JSON parser library written with GLib and GObject. JSON is the JavaScript Object Notation, and it's used to define objects and object hierarchies in a human-readable way.