summaryrefslogtreecommitdiff
path: root/json-glib/json-reader.h
Commit message (Collapse)AuthorAgeFilesLines
* Add new api json_reader_get_current_nodeFrederic Martinsons2022-10-111-0/+2
| | | | | | | | | | | This can be useful to extract a sub json structure during parsing of another (for example when we don't know in advance the format of this sub json and just want to pass it to another consumer). Closes #9 Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
* Update the JsonReader documentationEmmanuele Bassi2021-06-101-2/+4
|
* docs: Initial, rough port away from gtk-docEmmanuele Bassi2021-06-081-15/+0
| | | | | | | | | | Drop `SECTION` blurbs. Use gi-docgen syntax for internal links. Use summary lines for gi-docgen indices. Use Markdown syntax for code fragments.
* Add autoptr macrosEmmanuele Bassi2016-02-291-0/+4
| | | | | | | GLib can take advantage of the "cleanup" attribute by using a bunch of macro magic. This has been slowly been used across various libraries in the G* stack, so JSON-GLib should provide symbols for the automatic memory management of its types.
* Use compiler annotations to determine symbol visibilityEmmanuele Bassi2014-03-181-0/+22
| | | | | | | | | | | | | | | | | 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.
* docs: Port to MarkDownEmmanuele Bassi2014-03-181-4/+3
| | | | | Drop the DocBook documentation, and move everything to the MarkDown format used by modern gtk-doc.
* Move the single include guard after multiple inclusion oneEmmanuele Bassi2013-12-041-3/+3
| | | | | | | | | | | | | | GCC (and other compilers) can optimise multiple inclusion of headers if they find the: #ifndef FOO #define FOO #endif pattern as the first thing inside a header. The single-header inclusion guard was preventing that from happening, so we need to move it inside the multiple inclusion guard.
* reader: Do more strict validationEmmanuele Bassi2011-09-091-1/+9
| | | | | | | | JsonReader should perform more strict validation, and put itself in an error state whenever the user asks for values or information on nodes that are not there, or not of the right type. https://bugzilla.gnome.org/show_bug.cgi?id=658632
* Remove G_CONST_RETURN usageEmmanuele Bassi2011-06-091-3/+3
| | | | | | | | See GLib bug: https://bugzilla.gnome.org/show_bug.cgi?id=644611 The macro is going to be deprecated soon.
* reader: Add accessor for the member nameEmmanuele Bassi2011-02-061-0/+1
| | | | This should allow easy access to the member name during iteration.
* reader: Add list_members() methodEmmanuele Bassi2011-02-041-0/+1
| | | | | Allow retrieving a list of member names from the current cursor position of the JsonReader. It's useful if you're trying to inspect a JSON tree.
* reader: Add :root constructor propertyEmmanuele Bassi2010-08-141-1/+1
| | | | | A JsonReader is useless without a root JsonNode to start walking the tree from.
* reader: Do not wrap JsonParserEmmanuele Bassi2010-08-121-4/+2
| | | | | | | Since JsonParser has far more methods for parsing a JSON stream we should just make JsonReader an API for reading an already parsed JSON tree - in the same way that JsonBuilder does not generate the stringified version of the JSON tree it builds.
* reader: Mirror the JsonBuilder API value accessorsEmmanuele Bassi2010-08-121-5/+5
| | | | We should strive to make JsonBuilder and JsonReader similar in API.
* Add JsonReaderEmmanuele Bassi2010-08-121-0/+142
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.