| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
There's no point in having the API reference in its own sub-directory:
it's the only documentation we have.
|
|
|
|
| |
It's an internal header.
|
|
|
|
|
| |
We don't need to show what they evaluate to, given that the value
changes with every release.
|
|
|
|
|
| |
The API reference should list the header that user code should include
in order to use the API.
|
|
|
|
|
| |
Link the built API reference on developer.gnome.org, and the JSON
website.
|
|
|
|
|
| |
This is shared between the autotools and the Meson build, whereas
package_api_version is Meson-only.
|
|
|
|
|
|
| |
A simple case of calling xsltproc with the right doctype.
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
|
|
| |
We can use the gnome module to generate the JSON-GLib API reference.
https://bugzilla.gnome.org/show_bug.cgi?id=773603
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
Wrap JsonParser and JsonGenerator in simple, easy to call functions that
manage the objects for you.
|
|
|
|
|
| |
We can verify that the documentation is correct and up to date every
time we distcheck by turning on the gtk-doc check tool.
|
|
|
|
|
|
|
|
| |
We need to ensure that gtk-doc looks into both the srcdir and the
builddir in order to find all annotations.
We also don't need to have the .types file under revision control:
gtk-doc is perfectly capable of rebuilding it by itself.
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
The whole documentation is now MarkDown.
|
|
|
|
|
| |
We're building against a required version of GLib that does not need
type initialization.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The small utilities we ship should have their main pages included in the
API reference, similarly to what GLib does.
|
|
|
|
|
| |
The small utilities we build and install should have their own manual
pages.
|
|
|
|
| |
It has been replaced by AM_CPPFLAGS for a while.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We should simplify the JsonNode API a bit, especially when it comes to
initializing nodes. Instead of a two-step "new(<type>) followed by a
set_<type>(value)" API, we can provide a "init_<type>(value)" API that
can take any existing JsonNode and initialize it to the given type.
This makes the JsonNode creation more concise and reliable; it also
allows to implicitly re-initialize JsonNodes without requiring the user
to de-allocate/re-allocate them first.
|
|
|
|
| |
The deprecation macros should be in the private section.
|
| |
|
| |
|
| |
|
|
|
|
| |
This should allow easy access to the member name during iteration.
|
|
|
|
|
| |
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.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=632940
|
|
|
|
|
|
|
|
| |
Instead of asking everyone to use g_object_set() to set up a
JsonGenerator the class should provide a decent API for its properties.
While we're at it, we should also use modern API for installing and
notifying of property changes.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
We should strive to make JsonBuilder and JsonReader similar in API.
|
| |
|
|
|
|
|
|
|
| |
Currently, only synchronous API.
The output handling is pretty trivial, unlike the input handling in
JsonParser; this is a really basic convenience API.
|
| |
|
| |
|
|
|
|
|
| |
And silence gtk-doc-scanner by removing an undefined argument from
json_builder_add_null_value().
|
|
|
|
|
| |
The json-debug.h header is private and not installed; hence, it should
be ignored by gtk-doc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A GBoxed type defined as:
struct Boxed {
int foo;
gboolean bar;
int baz;
};
Can be represented either by a JSON object:
{
"foo" : 1,
"bar" : true,
"baz" : 3
}
Or by a JSON array:
[ 1, true, 3 ]
The current function for registering a serialization and a
deserialization pair does not allow registering more than one
deserialization function - which means that there can only be
one way to deserialize a GBoxed type into a specific JsonNode
type.
To allow having more than one JsonNodeType associated to a
GBoxed type and a deserialization function we need to split out
the registration of the serialization and deserialization functions
into two distinct functions.
|
|
|
|
|
|
|
|
|
|
| |
If you want to use the default implementation of serialize_property()
and/or deserialize_property() from an object class implementing
JsonSerializable you currently have to peek the interface vtable and
then call the vfunc pointers.
We can expose the default implementation through functions ourselves and
simplify the required code.
|
|
|
|
|
|
|
|
|
| |
Rename json_gobject_new() to json_gobject_deserialize(), and
json_gobject_dump() to json_gobject_serialize(); this maps the
JSON GBoxed API.
Also for consistency, change the serialize() return value and
the deserialize() argument to be JsonNodes of type JSON_NODE_OBJECT.
|