| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Add a JSON_ENCODE_VERSION macro and use it in JSON_VERSION_HEX.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Drop the DocBook documentation, and move everything to the MarkDown
format used by modern gtk-doc.
|
| |
|
|
|
|
| |
We over-assert() our pre-conditions, and the conversion is a bit
obfuscated. We should use a proper function, and de-obfuscate the
code so that the intent is clear.
|
| |
|
|
|
| |
JsonNode, JsonObject, and JsonArray have various constructors, so we
need to annotate them.
|
| |
|
|
|
|
|
|
|
| |
As unistd.h is not universally available, don't include it unconditionally
and include the corresponding Windows headers where necessary. Also, use
gssize in place of ssize_t and define STDOUT_FILENO on Windows when we
don't have unistd.h, which is a constant that is defined in unistd.h.
https://bugzilla.gnome.org/show_bug.cgi?id=723813
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a call to json_reader_read_element() fails if the element
doesn't exist, we need to call json_reader_end_element() to clear
out any errors.
But the _end_element() call will backtrack to the parent node,
when the _read_element() call did not set the child node.
To fix this, leave early from _end_*() calls when an error has
been set.
https://bugzilla.gnome.org/show_bug.cgi?id=723428
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=723428
|
| |
|
|
|
|
| |
Fix cut'n'paste error.
https://bugzilla.gnome.org/show_bug.cgi?id=721137
|
| | |
|
| |
|
|
|
| |
Only include the necessary headers, and use a single-header inclusion
guard to prevent people from including only json-gvariant.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Instead of sizeof(array)/sizeof(type).
|
| |
|
|
|
|
|
|
|
| |
Consider the following JSON: ["123"]
Trying to convert it to GVariant with signature "(i)" would previously fail,
as string-to-number conversions weren't implemented. This patch implements
string-to-number and string-to-boolean conversions.
https://bugzilla.gnome.org/show_bug.cgi?id=707382
|
| |
|
|
|
|
|
| |
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Conflicts:
json-glib/tests/path.c
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
The pkg-config file for a library is tied to the source, so it should
not be in the top-level of the project.
|
| |
|
|
|
|
|
|
|
| |
The -no-undefined linker flag is needed only when compiling for Windows,
and it's added conditionally. Except that we also add it unconditionally
in the LDFLAGS used for the libjson-glib-1.0 shared object. Whoopsie.
We should also drop the unneeded -rpath: distributions will go out of
their way to patch it out in any case.
|
| |
|
|
|
|
|
|
| |
We don't need a custom Makefile for quiet rules: AM_V_GEN is pretty much
all we use anyway.
The Makefile.am.gtest file is not included any longer, since we switched
to TAP and GLib's own rules for unit testing.
|
| |
|
|
| |
Use the same spacing and formatting rules.
|
| |
|
|
|
| |
A simple command line utility to format JSON data; it allows prettifying
and unprettifying JSON.
|
| |
|
|
|
| |
The json-glib-validate tool is a small utility that validates the data
found at the URIs passed on its command line.
|
| |
|
|
|
|
| |
JSON is defined to be encoded using UTF-8, so we should not rely on
the documentation saying so when parsing, but validate the input and
eventually provide a recoverable parsing error.
|
| |
|
|
|
| |
Do not just pass the GError through from the public-facing arguments: we
may want to perform error checking internally at any later date.
|
| | |
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=708318
|
| |
|
|
| |
We can use the autogenerated get_instance_private() function.
|
| |
|
|
| |
And use g_test_build_filename().
|
| |
|
|
|
|
|
| |
Instead of our homegrown solution. This should fix the regression in the
installed tests case.
Original patch by: Colin Walters <walters@verbum.org>
|
| |
|
|
|
| |
The JSON_PARSER_GET_PRIVATE macro is pointless, now that we use the new
version of GLib.
|
| |
|
|
|
| |
We depend on a new version of GLib, so we can remove a bunch of old
version checks.
|
| | |
|
| |
|
|
|
| |
Instead of using the old GLib test harness, we should use the newly
added TAP support and the TAP driver inside autotools.
|
| |
|
|
|
|
|
|
| |
If we're being compiled against a newer version of GLib, we should use
the new macros that add instance private data.
Since this is a stable branch, we cannot bump the GLib requirement; so
we use version checks to conditionally compile the new code.
|
| |
|
|
| |
It has been replaced by AM_CPPFLAGS for a while.
|
| |
|
|
|
|
|
| |
See https://live.gnome.org/GnomeGoals/InstalledTests for more
information.
It's still possible to run `make check` with locally uninstalled tests.
|
| |
|
|
|
| |
Run each expression as a separate unit, so we can catch errors more
quickly and easily.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
This will allow adding negative tests to JsonPath.
The tests will only be caught when compiling the query; an invalid query
won't return a match, so there's no point to check matches.
|
| |
|
|
|
| |
The returned GVariant when deserializing from JSON has a floating
reference that needs to be sunk.
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=693575
|
| |
|
|
|
| |
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
|
| |
|
|
|
|
| |
Instead of a regular expression. This allows us to catch ABI issues
immediately, without using the ABI check, while building JSON-GLib,
even on *nix.
|
| | |
|