|
Packit |
4c4d6b |
JSON-GLib
|
|
Packit |
4c4d6b |
===============================================================================
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
JSON-GLib implements a full suite of JSON-related tools using GLib and GObject.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Use JSON-GLib it is possible to parse and generate valid JSON data
|
|
Packit |
4c4d6b |
structures using a DOM-like API. JSON-GLib also integrates with GObject to
|
|
Packit |
4c4d6b |
provide the ability to serialize and deserialize GObject instances to and from
|
|
Packit |
4c4d6b |
JSON data types.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
JSON is the JavaScript Object Notation; it can be used to represent objects and
|
|
Packit |
4c4d6b |
object hierarchies while retaining human-readability.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
GLib is a C library providing common and efficient data types for the C
|
|
Packit |
4c4d6b |
developers.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
GObject is a library providing a run-time Object Oriented type system for C
|
|
Packit |
4c4d6b |
developers. GLib and GObject are extensively used by the GTK+ toolkit and by the
|
|
Packit |
4c4d6b |
[GNOME][gnome] project.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
For more information, see:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
* [JSON][json]
|
|
Packit |
4c4d6b |
* [GLib and GObject][glib]
|
|
Packit |
4c4d6b |
* [JSON-GLib][json-glib]
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Requirements
|
|
Packit |
4c4d6b |
--------------------------------------------------------------------------------
|
|
Packit |
4c4d6b |
In order to build JSON-GLib you will need:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
* python3
|
|
Packit |
4c4d6b |
* [ninja](http://ninja-build.org)
|
|
Packit |
4c4d6b |
* [meson](http://mesonbuild.com)
|
|
Packit |
4c4d6b |
* pkg-config
|
|
Packit |
4c4d6b |
* gtk-doc ≥ 1.13 (optional)
|
|
Packit |
4c4d6b |
* GLib, GIO ≥ 2.38
|
|
Packit |
4c4d6b |
* GObject-Introspection ≥ 1.38 (optional)
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Build and installation
|
|
Packit |
4c4d6b |
--------------------------------------------------------------------------------
|
|
Packit |
4c4d6b |
To build JSON-GLib just run:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
```sh
|
|
Packit |
4c4d6b |
$ meson _build .
|
|
Packit |
4c4d6b |
$ ninja -C _build
|
|
Packit |
4c4d6b |
$ mesontest -C _build
|
|
Packit |
4c4d6b |
$ sudo ninja -C _build install
|
|
Packit |
4c4d6b |
```
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
See the [Meson documentation](http://mesonbuild.com) for more information.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Contributing
|
|
Packit |
4c4d6b |
--------------------------------------------------------------------------------
|
|
Packit |
4c4d6b |
If you find a bug in JSON-GLib, please file an issue on the
|
|
Packit |
4c4d6b |
[Issues page][gitlab-issues].
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Required information:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
* the version of JSON-GLib
|
|
Packit |
4c4d6b |
* if it is a development version, the branch of the git repository
|
|
Packit |
4c4d6b |
* the JSON data that produced the bug (if any)
|
|
Packit |
4c4d6b |
* a small, self-contained test case, if none of the test units exhibit the
|
|
Packit |
4c4d6b |
buggy behaviour
|
|
Packit |
4c4d6b |
* in case of a segmentation fault, a full stack trace with debugging
|
|
Packit |
4c4d6b |
symbols obtained through gdb is greatly appreaciated
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
JSON-GLib is developed mainly inside a GIT repository available at:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
https://gitlab.gnome.org/GNOME/json-glib/
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
You can clone the GIT repository with:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
git clone https://gitlab.gnome.org/GNOME/json-glib.git
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
If you want to contribute functionality or bug fixes to JSON-GLib you should
|
|
Packit |
4c4d6b |
fork the json-glib repository, work on a separate branch, and then open a
|
|
Packit |
4c4d6b |
merge request on Gitlab:
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
https://gitlab.gnome.org/GNOME/json-glib/merge_requests/new
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Please, try to conform to the coding style used by JSON-GLib, which is the same
|
|
Packit |
4c4d6b |
used by projects like GLib, [GTK+][gtk-coding-style], and Clutter. Coding style
|
|
Packit |
4c4d6b |
conformance is a requirement for upstream acceptance.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Make sure you always run the test suite when you are fixing bugs. New features
|
|
Packit |
4c4d6b |
should come with a test unit. Patches that regress the test suite will be
|
|
Packit |
4c4d6b |
rejected.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Release notes
|
|
Packit |
4c4d6b |
--------------------------------------------------------------------------------
|
|
Packit |
4c4d6b |
* Prior to JSON-GLib 0.10, a JsonSerializable implementation could
|
|
Packit |
4c4d6b |
automatically fall back to the default serialization code by simply
|
|
Packit |
4c4d6b |
returning NULL from an overridden JsonSerializable::serialize-property
|
|
Packit |
4c4d6b |
virtual function. Since JSON-GLib 0.10 this is not possible any more. A
|
|
Packit |
4c4d6b |
JsonSerializable is always expected to serialize and deserialize all
|
|
Packit |
4c4d6b |
properties. JSON-GLib provides public API for the default implementation
|
|
Packit |
4c4d6b |
in case the serialization code wants to fall back to that.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Copyright and licensing
|
|
Packit |
4c4d6b |
--------------------------------------------------------------------------------
|
|
Packit |
4c4d6b |
JSON-GLib has been written by Emmanuele Bassi
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
JSON-GLib is released under the terms of the GNU Lesser General Public License,
|
|
Packit |
4c4d6b |
either version 2.1 or (at your option) any later version.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
See the file COPYING for details.
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
Copyright 2007, 2008 OpenedHand Ltd
|
|
Packit |
4c4d6b |
Copyright 2009, 2010, 2011, 2012 Intel Corp.
|
|
Packit |
4c4d6b |
Copyright 2013 Emmanuele Bassi
|
|
Packit |
4c4d6b |
|
|
Packit |
4c4d6b |
[json]: http://www.json.org "JSON"
|
|
Packit |
4c4d6b |
[glib]: http://www.gtk.org "GTK+"
|
|
Packit |
4c4d6b |
[json-glib]: https://wiki.gnome.org/Projects/JsonGlib "JSON-GLib wiki"
|
|
Packit |
4c4d6b |
[gnome]: https://www.gnome.org "GNOME"
|
|
Packit |
4c4d6b |
[gitlab-issues]: https://gitlab.gnome.org/GNOME/json-glib/issues
|
|
Packit |
4c4d6b |
[gtk-coding-style]: https://git.gnome.org/browse/gtk+/tree/docs/CODING-STYLE
|