| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774688
|
| |
|
|
|
|
| |
We use Meson to build JSON-GLib, now.
|
|
|
|
|
|
| |
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772753
|
| |
|
| |
|
|
|
|
| |
We depend on gio-2.0, which strings along glib-2.0 and gobject-2.0.
|
|
|
|
| |
We need to specify the sub-directory for the inclusion directive.
|
|
|
|
|
|
| |
The autotools build specifies the include header with the --c-include
argument for g-ir-scanner, so we need to do the same when building with
Meson.
|
|
|
|
|
| |
We have a couple of generated header files, which means we need to list
them as sources for the introspection scanner.
|
|
|
|
|
|
|
| |
We don't need to make internal targets depend on generated sources, just
on the generated header files. Depending on the generated sources will
cause Meson to compile the generated sources once for each internal
target.
|
|
|
|
| |
The single include 'json-glib.h' header is missing.
|
|
|
|
| |
The file is generated at configuration time.
|
|
|
|
|
|
| |
We should install our tests in order to get them executed in
environments like GNOME Continuous and other continuous delivery
systems.
|
|
|
|
| |
Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
|
|
|
|
|
|
|
| |
We want more warnings to be printed out when build json-glib.
We also want to take advantage of linker flags like z,relro and z,now,
as well as -Bsymbolic-functions.
|
|
|
|
|
|
|
| |
We need to tell the compiler that the 3rd argument is a format-like
string, and that the arguments for that come in the variadic arguments
list; this allows compilers like GCC to do validation on the format
string itself, and avoid a whole class of bugs.
|
|
|
|
|
|
| |
We can use the gnome module to generate the JSON-GLib API reference.
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
|
|
| |
Clean up the coding style, and make it a bit more idiomatic.
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
| |
Original patch by: Thibault Saunier <tsaunier@gnome.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When converting json to its string representation, whole-doubles (such
as 1.0) would be converted into strings without decimals ("1"). That can
be inconvenient e.g. when converting from/to GVariants.
To avoid this, append '.0' to the string representation for doubles if
they lost their decimals in the conversion.
Also add / update unit tests for this.
https://bugzilla.gnome.org/show_bug.cgi?id=753763
|
|
|
|
|
|
| |
Or compilation fails with -Werror
https://bugzilla.gnome.org/show_bug.cgi?id=773604
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
|
|
|
| |
We seal nodes conditionally on the :immutable property, but we are
sealing their contents unconditionally.
https://bugzilla.gnome.org/show_bug.cgi?id=779970
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 028e540 disallowed empty member names in objects, however
they are unfortunately valid JSON. This patch reenables an empty
string as a member name.
Tests are updated to allow the empty string case, and to test
the use of an empty string in generation, iteration etc.
https://bugzilla.gnome.org/show_bug.cgi?id=747279
|
|
|
|
|
| |
This way developers can use G_DECLARE_INTERFACE with Serializable as a
pre-condition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clarify in the documentation what each of the JsonNode getters when
called on a node which contains a value whose type is not what the
caller expects (since this behaviour is well-defined in the code).
Add relevant (nullable) annotations too.
Inspired by http://stackoverflow.com/q/42081921/2931197.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=779464
|
|
|
|
| |
They need to be exactly one line above a string to show up in .po files.
|
|
|
|
|
|
|
| |
This changes the introspection build process on MSVC by moving the
source/header list generation from using a Python script to generating
the list (and the full command lines for g-ir-scanner and g-ir-compiler)
using the common autotools module, to make it more easily maintained.
|
|
|
|
|
|
|
|
|
| |
This makes use of the common build/Makefile.msvcproj to create the full
Visual Studio 2008/2010 project files from their respective templates,
while making the autotools files cleaner. As an added benefit, this also
enables the list of headers to "install" to be filled in automatically
during 'make dist', so that we will have to worry less about the addition
or removal of public headers.
|
|
|
|
|
| |
The json_node_is_immutable() missed an JSON_AVAILABLE_IN_1_2, causing it
not to be exported. Fix this.
|
|
|
|
|
| |
This allows conditional compilation, and it makes the debugging code
consistent.
|
| |
|
| |
|
| |
|
|
|
|
| |
The newly added API is available since 1.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that these objects can be marked as immutable, it is possible to
calculate and cache hash values for each of them. This allows efficient
hash-based deduplication of large numbers of JSON nodes, as needed by
Walbottle for JSON test vector generation.
To complement the new hash functions, each of JsonNode, JsonValue,
JsonObject and JsonArray also now have an equal() comparison method.
This compares them structurally and recursively, using the definition of
equality from the JSON Schema specification, which seems as good as any
other.
http://json-schema.org/latest/json-schema-core.html#anchor9
https://bugzilla.gnome.org/show_bug.cgi?id=756121
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Add an immutable mode to JsonNode, JsonObject, JsonArray and JsonValue.
This is an optional mode which objects enter by calling json_*_seal().
It is a one-way transition, which means that we can build and manipulate
objects as much as desired, before sealing them and enjoying the
benefits of immutable objects: no need to take copies when handling
them, persistent hash values (still to be implemented).
https://bugzilla.gnome.org/show_bug.cgi?id=756121
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Just like we detect trailing commas, we should also detect missing ones
to avoid parsing invalid JSON successfully.
|
|
|
|
|
| |
We pass the counter to the JsonParser::array-element signal, but we
never really increment it.
|
|
|
|
| |
They are not needed — json-glib is not at all thread safe.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Use padding which resembles the ABI structure of GHashTableIter so that
our struct size is the same as GHashTableIter on all platforms, rather
than just on x86_64. This fixes the static assertion failure on i386 and
armhf.
https://bugzilla.gnome.org/show_bug.cgi?id=757675
|
|
|
|
|
|
|
|
|
|
| |
This is a stack-allocated iterator object similar to GHashTableIter
which allows allocation-free iteration over the members in a JsonObject.
It differs from json_object_foreach_member() in the order in which it
iterates — for JsonObjectIter the order is undefined.
https://bugzilla.gnome.org/show_bug.cgi?id=755509
|
|
|
|
|
|
| |
GLib 2.46.0 forbids this and so the testsuite fails.
https://bugzilla.gnome.org/show_bug.cgi?id=755977
|