summaryrefslogtreecommitdiff
path: root/json-glib/json-parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Add line/position getters to JsonParserEmmanuele Bassi2007-10-051-9/+12
| | | | | | Add two methods to JsonParser to retrieve the currently parsed line and position within that line. These methods works only while parsing, so within the signal handlers and inside subclasses.
* Document the newly added signalsEmmanuele Bassi2007-10-051-1/+9
|
* Add more signals to the JsonParser classEmmanuele Bassi2007-10-051-3/+22
| | | | | | | JsonParser should emit signals in critical places, like: start/end of the parsing process; start and end of a JsonObject and a JsonArray; completion of every member and element of a JsonObject and a JsonArray. These signals require the addition of some custom marshaller.
* Complete API reference of JSON-GLibEmmanuele Bassi2007-10-011-0/+19
| | | | With this commit, we reach 100% coverage.
* Add licensing informations to the source codeEmmanuele Bassi2007-10-011-0/+19
|
* Add JsonNode, a generic container for JSON typesEmmanuele Bassi2007-10-011-1/+1
| | | | | | | | | | | | | | | | | 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 stubs to JsonParser for actually parsing a JSON streamEmmanuele Bassi2007-09-211-3/+25
| | | | | | | | | | | | | | | | | Initial commit for getting JsonParser to work. Because GScanner API is old and mostly sucks, we need to do some magic with signals. If json_parser_load_from_data() fails, the passed GError will be set with a JSON_PARSER_ERROR code and message; unfortunately, we can't get the nice error message out of GScanner. We can, however, override the default message handler and make it emit a signal on the JsonParser object. So, to make a long story short: the GError passed to the load_from_data() method is filled with a short error message; the *real* error message is passed to the ::error signal handlers so they can actually use it. GScanner should really get a way to retrieve the last error message.
* Initial import of JSON-GLibEmmanuele Bassi2007-09-201-0/+57
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.