summaryrefslogtreecommitdiff
path: root/json-glib/json-glib.h
Commit message (Collapse)AuthorAgeFilesLines
* Add simple JSON/string utilitiesEmmanuele Bassi2015-06-091-0/+1
| | | | | Wrap JsonParser and JsonGenerator in simple, easy to call functions that manage the objects for you.
* Use compiler annotations to determine symbol visibilityEmmanuele Bassi2014-03-181-0/+1
| | | | | | | | | | | | | | | | | Instead of relying on a separate file that requires being update every time we add a new public function we should use compiler annotations to let the linker know which symbols are public and exported. In order to achieve this we have to: * check for the visibility=hidden attribute * add -fvisibility=hidden to the linker flags * add a macro to annotate all public symbols While we're at it, we should copy the versioned symbols macro layout already used by GLib, GTK+, and other G* libraries, including the ability to express the range of allowed versions of JSON-GLib that third party code can compile against.
* Add initial JSONPath implementationEmmanuele Bassi2011-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSONPath is a JSON query syntax similar to what XPath does for XML; using JSONPath it's possible to address a specific node (or set of nodes) inside a JSON document. The JsonPath class is a simple implementation of part of the JSONPath proposal, as formalised by Stefan Gössner here: http://goessner.net/articles/JsonPath/ The covered operators are: • root, or '$'; • child, both using the dot-notation and the bracket notation; • recursive descent, or '..'; • subscript, or '[]'; • set, or '[,]'; • slice, or '[start:end:step]'. The only missing operators are the filter, or '?()' and the script, or '()', because implementing a JavaScript interpreter inside JSON-GLib is not one of my greatest aspirations. It should be possible, though, to parse and evaluate simple arithmetic conditions, in the future. The JsonPath methods are pretty straightforward: a JsonPath instance should be created and used to compile an expression; the compilation might result in a syntax error or not. Then, the JsonPath instance can be used to match any JSON tree. Like the other JSONPath implementations, JsonPath returns a JSON array of matching nodes. A simple, one-off static method called json_path_query() is also provided; the method wraps the JsonPath creation, the expression compilation, and the matching, as well as disposing the JsonPath instance once done. For the time being, only positive testing is provided; negative testing for the expression compilation will follow.
* gvariant: Adds JSON GVariant integration API, with docs and testsEduardo Lima Mitev2011-01-261-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=632940
* Add JsonReaderEmmanuele Bassi2010-08-121-0/+3
| | | | | | JsonReader is a simple, cursor-based API for parsing a JSON DOM. It is similar, in spirit, to the XmlReader API provided by various platforms and XML parsing libraries.
* builder: Add convenience API for building JSON trees.Luca Bruno2010-06-161-0/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=621141 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* Disallow single header file inclusionEmmanuele Bassi2009-08-121-0/+6
| | | | | | | | | The correct header file for JSON-GLib is, and has always been, json-glib.h. Anything else was not supported, as we've been moving around stuff for a while, now. This commit enforces the single include file, using the same policy enacted by other libraries, like: GLib, GTK+ and Clutter.
* Fix license and copyright noticesEmmanuele Bassi2009-06-091-0/+23
| | | | | | | | THere is no such thing as the "Lesser General Public License version 2": the LGPL v2 is the "Library GPL", and has been superceded by v2.1 with the new "Lesser GPL" name. Also, the copyright is now Intel Corp.
* Remove the include for json-scanner.hEmmanuele Bassi2008-05-181-1/+0
| | | | The json-scanner.h header file is not shipped with JSON-GLib anymore.
* Include the newly added json-enum-types.h headerEmmanuele Bassi2008-04-241-0/+1
| | | | | When including json-glib/json-glib.h we get everything json-glib expose as a public symbol.
* Add json-scanner.h to the exported headersEmmanuele Bassi2008-02-291-0/+1
|
* Add missing json-generator.h headerEmmanuele Bassi2007-10-011-0/+1
|
* Initial import of JSON-GLibEmmanuele Bassi2007-09-201-0/+8
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.