| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Avoid compiler warnings when running with `-Wunused-parameter`.
|
|
|
|
|
| |
When running with `-Wsign-compare` we're raising a lot of
signed/unsigned comparison warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Drop `SECTION` blurbs.
Use gi-docgen syntax for internal links.
Use summary lines for gi-docgen indices.
Use Markdown syntax for code fragments.
|
|
|
|
|
|
|
| |
Use JsonObject's private members_ordered
GQueue instead. This avoids a g_list_copy().
https://bugzilla.gnome.org/show_bug.cgi?id=773504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The doc for json-glib misstates the meaning of the JsonPath set notation
operator, as in
$.store.book[0,2]
This does not mean elements 0 to 2 (a range) but rather just elements 0
and 2.
This is correctly handled in the library; it's just the doc that is
wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=768788
|
| |
|
|
|
|
|
|
| |
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772753
|
| |
|
|
|
|
| |
They need to be exactly one line above a string to show up in .po files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add reference counting semantics to JsonNode, in addition to the
existing init/unset and alloc/free semantics.
json_node_free() must only be used with nodes allocated using
json_node_alloc(). json_node_unref() may be used with all nodes (if
correctly paired; it may be paired with json_node_alloc()).
It is not valid to call json_node_free() on a node whose reference count
is not 1.
https://bugzilla.gnome.org/show_bug.cgi?id=756121
|
|
|
|
| |
All the platforms and build system we support have a config.h header.
|
|
|
|
|
| |
Drop the DocBook documentation, and move everything to the MarkDown
format used by modern gtk-doc.
|
|
|
|
|
|
|
| |
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Conflicts:
json-glib/json-path.c
|
|
|
|
| |
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
|
|
|
| |
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=708318
|
| |
|
|
|
|
|
|
| |
Mark json_get_debug_flags() as an internal function, and drop the '_'
prefix; also, add a simple macro that we can use everywhere to mask the
function call.
|
|
|
|
|
| |
The path parsing function is already pretty long, so we should isolate
the debugging code out of the way.
|
|
|
|
| |
Instead of hand-writing the error domain function ourselves.
|
|
|
|
|
| |
Similar to the fix that went in commit path e348b1fa, we need to fix
getting all the members of an object by using the wildcard notation.
|
|
|
|
|
|
|
|
|
| |
Using the same data as in tests, asking for $['store']['book'][*] JSON path
should return all the book objects in an array.
But that array is returned inside another array, dupped several times.
https://bugzilla.gnome.org/show_bug.cgi?id=691557
|
| |
|
|
|
|
| |
These errors might find their way into a UI.
|
|
|
|
| |
We need to translate the GError messages.
|
|
|
|
|
|
| |
This reverts commit e8fa85705e48d03742eb351addbad53be4d8e60b.
The validation broke the test suite; it'll need some more work.
|
|
|
|
| |
Especially for the slice syntax.
|
| |
|
|
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.
|