| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Including the autotools generated config.h should always be conditional
on the HAVE_CONFIG_H definitions.
|
|
|
|
| |
Avoid feeding garbage to the callers by using g_slice_new0().
|
|
|
|
| |
JsonNode payload is inside a union.
|
|
|
|
|
|
| |
We need a GType for nodes if we want to add JsonNode properties or signal
marshallers to a GObject class. We could use pointers, but we'd loose type
safety, so it's a no-no.
|
|
|
|
|
| |
Before calling json_object_unref() or json_array_unref() in json_node_free()
we need to check if the payload of JsonNode is set to avoid a critical.
|
|
|
|
|
| |
The newly added json_node_dup_string() is a convenience function for
getting a copy of the string contained inside a JsonNode.
|
|
|
|
|
|
| |
This commit adds some convenience accessors for setting and
getting fundamental types in and from a JsonNode, to avoid
jumping through all the GValue hoops.
|
|
|
|
|
| |
Now that we moved the constructors and setters for the JSON data types into
the public symbols we need to document them to get back to 100% doc coverage.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It seems that the parent accessor fell through. This commit implements
the declared json_node_get_parent() function.
|
| |
|
|
|
|
|
| |
Use gtk-doc to build the various bits and pieces of the API reference
for JSON-GLib.
|
|
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.
|