summaryrefslogtreecommitdiff
path: root/json-glib/json-object.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a note in the JsonObject documentation for the member name normalizationEmmanuele Bassi2007-10-161-1/+5
|
* Normalize every member name before using itEmmanuele Bassi2007-10-161-5/+26
| | | | | | | | | Every member name is stored inside the internal hash table of JsonObject using a normalized string: every delimiter found matching G_STR_DELIMITERS is automatically transformed in an underscore ('_'). This means that "member-name" and "member_name" are completely equivalent for a JsonObject.
* Provide an internal g_hash_table_get_keys() and bump down GLib dependencyEmmanuele Bassi2007-10-151-0/+25
| | | | | | | Even though GLib 2.14 is now available, many systems still come out with GLib 2.12. Since we are using just a single 2.14 function for retrieving the members from a JsonObject, we can provide an internal version of that function and hideit behind a pre-processor macro.
* Add API for removing nodes from arrays and objectsEmmanuele Bassi2007-10-151-0/+17
| | | | | | | Write and document json_object_remove_member() and json_array_remove_element() which can be used to remove a JsonNode from a JsonObject or a JsonArray respectively. This way, the JsonObject and JsonArray are API-complete and the object model can be manipulated in code.
* Fix documentation about the ownership of the nodesEmmanuele Bassi2007-10-071-5/+8
| | | | | When adding a JsonNode to a JsonObject or a JsonArray, the containers take ownership of the node.
* Implement the GType functions for JsonObject and JsonArrayEmmanuele Bassi2007-10-051-0/+13
| | | | | | | | | | The type functions for the JsonObject and JsonArray types were declared, albeit with the wrong return value, but not implemented. This commit fixed the return value and implements them. JsonObject and JsonArray are boxed types because we don't need them to be GObjects (no signals, no inheritance and their implementation must be completely opaque for the developer).
* Document the new public functionsEmmanuele Bassi2007-10-011-0/+15
| | | | | 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.
* Move data types ctors and setters into the public headersEmmanuele Bassi2007-10-011-1/+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.
* Add licensing informations to the source codeEmmanuele Bassi2007-10-011-4/+30
|
* Add JsonNode, a generic container for JSON typesEmmanuele Bassi2007-10-011-32/+12
| | | | | | | | | | | | | | | | | 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.
* Initial import of JSON-GLibEmmanuele Bassi2007-09-201-0/+201
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.