summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * build: Maintain Autotools compatibility on DarwinEmmanuele Bassi2020-08-242-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | JSON-GLib 1.2 was the last release using Autotools on Darwin, which means we cannot use "1" as the compatibility version argument. We should also use the `darwin_versions` argument for `library()` to let Meson do the right thing depending on the platform, instead of passing linker flags ourselves. Original patch by: Tom Schoonjans Fixes: #41
| * Properly detect multiple top level statementsEmmanuele Bassi2020-08-242-15/+13
| | | | | | | | | | | | | | | | JSON can only have one top level statement. If we get multiple statements, we should error out appropriately, and we should also avoid leaking the node for the previously parsed statement. Fixes: #45
| * Plug leaks in json-glib-formatEmmanuele Bassi2020-08-241-3/+14
| | | | | | | | | | We're leaking a bunch of strings in error paths, as well as the stream for the input file.
| * build: Bring back JSON_ENABLE_DEBUGEmmanuele Bassi2020-08-241-0/+4
| | | | | | | | | | The Meson port silently dropped the ability to enable debugging messages at run time. Let's bring it back.
| * Document json_from_string() nullabilityEmmanuele Bassi2020-08-241-2/+2
| | | | | | | | | | | | | | | | The function can return NULL even without setting an error, so we need to add a `nullable` annotation. While at it, document the handling of empty strings more explicitly. Fixes: #46
| * Assert that foreach_member() won't mutate the objectEmmanuele Bassi2020-08-241-0/+5
| | | | | | | | | | | | | | We document that it's not safe, but we kind of rely on GHashTable to do that for us. Instead, let's use the newly added age field to protect against accidental mutations during iteration, just like we do for the iterator API.
| * Document the iteration order for foreach_member()Emmanuele Bassi2020-08-241-0/+3
| | | | | | | | | | The iteration order is the insertion order, and has been for a long time.
| * Add ordered iterator for JsonObjectEmmanuele Bassi2020-08-245-10/+185
| | | | | | | | | | | | | | | | | | The current iterator API does not guarantee the iteration order, as it's based off of the hash table iterator. JsonObject, though, can guarantee the iteration order—we do that for json_object_foreach_member(). Instead of changing the behaviour of json_object_iter_next(), we can add API to initialize and iterate a JsonObjectIter in insertion order.
| * Use non-deprecated GObject constructor and typesEmmanuele Bassi2020-08-241-28/+23
| | | | | | | | | | Both g_object_newv() and GParameter have been deprecated for a long time.
| * build: Bump up the GLib dependencyEmmanuele Bassi2020-08-241-1/+1
| | | | | | | | Require a non-ancient version of GLib.
| * build: Bump up the version of MesonEmmanuele Bassi2020-08-241-1/+1
| |
| * build: Remove unnecessary argumentEmmanuele Bassi2020-08-241-1/+0
|/ | | | | The configure_file() function does not need an `install` argument with an unconditional value.
* Merge branch 'clang11' into 'master'Emmanuele Bassi2020-08-241-1/+1
|\ | | | | | | | | Unbreak build with Clang 11 See merge request GNOME/json-glib!29
| * scanner: use macro instead of cast to convert pointer to integerDimitry Andric2020-08-191-1/+1
| | | | | | | | | | | | | | | | | | Clang 11 build failed due to a new warning (part of -Werror=pointer-to-int-cast): ../json-glib/json-scanner.c:928:13: error: cast to smaller integer type 'GTokenType' from 'gpointer' (aka 'void *') [-Werror,-Wvoid-pointer-to-enum-cast] *token_p = (GTokenType) value_p->v_symbol; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jan Beich <jbeich@FreeBSD.org>
* | Update Japanese translationsicklylife2020-08-211-9/+9
| |
* | Update Japanese translationsicklylife2020-08-211-6/+6
|/
* Merge branch 'wip/smcv/default-symver' into 'master'Emmanuele Bassi2020-07-021-0/+1
|\ | | | | | | | | | | | | build: Add a symbol version to all exported symbols Closes #33 See merge request GNOME/json-glib!28
| * build: Add a symbol version to all exported symbolsSimon McVittie2020-07-011-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --default-symver linker option attaches a default version definition (the SONAME) to every exported symbol. It is supported since at least GNU binutils 2.22 in 2011 (older versions not tested). With this version definition, newly-linked binaries that depend on the json-glib shared library will refer to its symbols in a versioned form, preventing their references from being resolved to a symbol of the same name exported by json-c or libjansson if those libraries appear in dependency search order before json-glib, which will usually result in a crash. This is necessary because ELF symbol resolution normally uses a single flat namespace, not a tree like Windows symbol resolution. At least one symbol (json_object_iter_next()) is exported by all three JSON libraries. Linking with -Bsymbolic is not enough to have this effect in all cases, because -Bsymbolic only affects symbol lookup within a shared object, for example when json_from_string() calls json_parser_new(). It does not affect symbol lookup when external code calls into json-glib, for example when libedataserver calls json_parser_new(). This change will also not prevent code that depends on json-c or libjansson from finding json-glib's symbols and crashing; to prevent that, a corresponding change in json-c or libjansson would be needed. Adding a symbol-version is a backwards-compatible change, but once added, removing or changing the symbol-version would be an incompatible change that requires a SONAME bump. Partially resolves https://gitlab.gnome.org/GNOME/json-glib/-/issues/33 and https://gitlab.gnome.org/GNOME/glib/-/issues/2147. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'memory-mapping' into 'master'Emmanuele Bassi2020-06-166-9/+138
|\ | | | | | | | | json-parser: Support loading files via memory mapping See merge request GNOME/json-glib!27
| * json-parser: Support loading files via memory mappingPhilip Withnall2020-06-096-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new `json_parser_load_from_mapped_file()` to load JSON from files via memory mapping. It’s otherwise similar to `json_parser_load_from_file()`. It’s in the right position to be able to memory map the file it’s reading from: it reads the input once before building a `JsonNode` structure to represent it, doesn’t write to the file, and often deals with large input files. This should speed things up slightly due to reducing time spent allocating a large chunk of heap memory to load the file into, if a caller can support that. Signed-off-by: Philip Withnall <withnall@endlessm.com>
| * tests: Factor out a helper functionPhilip Withnall2020-06-091-9/+17
|/ | | | | | | This introduces no functional changes, but will allow that code to be reused in the following commit. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Merge branch 'ci-update' into 'master'Emmanuele Bassi2020-04-081-1/+1
|\ | | | | | | | | ci: Update the base CI image See merge request GNOME/json-glib!25
| * ci: Update the base CI imageEmmanuele Bassi2020-04-081-1/+1
| |
* | Merge branch 'gvariant-errno2' into 'master'Emmanuele Bassi2020-04-061-6/+9
|\ \ | | | | | | | | | | | | json-gvariant: Fix poorly written patch in 212f925 See merge request GNOME/json-glib!23
| * | json-gvariant: Fix poorly written patch in 212f925Robert Ancell2020-04-071-6/+9
|/ / | | | | | | | | | | | | | | Don't double do the integer conversion. Catch errors in double conversion. Do correct unsiged conversion. Friends don't let friends do end-of-day last minute MRs.
* | Merge branch 'gvariant-errno' into 'master'Emmanuele Bassi2020-04-061-7/+26
|\ \ | | | | | | | | | | | | json-gvariant: Stop string to GVariant conversion failing due to unrelated errno changes See merge request GNOME/json-glib!22
| * | json-gvariant: Stop string to GVariant conversion failing due to unrelated ↵Robert Ancell2020-04-061-7/+26
|/ / | | | | | | | | | | | | | | | | | | errno changes This was observed as failing due to some codepath inside g_variant_new_string setting errno to EAGAIN. Json Glib was erroneously detecting this in the checks designed to catch string to integer conversions. Solved by making errno only checked after the integer conversions.
* | Update Ukrainian translationDaniel Korostil2020-03-161-109/+146
|/
* Update Japanese translationsicklylife2020-01-281-68/+45
|
* Update Japanese translationsicklylife2020-01-281-69/+222
|
* Merge branch 'fix/default-deserialization' into 'master'Emmanuele Bassi2020-01-141-0/+9
|\ | | | | | | | | Fix default deserialization method. See merge request GNOME/json-glib!16
| * serializable: Fix default deserialization method.Jeremy Philippe2020-01-131-0/+9
|/ | | | | | | | | json_serializable_default_deserialize_property() fails when called with an uninitialized value. This violates the API since value is marked as an out parameter. Fixes https://gitlab.gnome.org/GNOME/json-glib/issues/39
* Merge branch 'dab_add_conditional_tests' into 'master'Emmanuele Bassi2020-01-132-1/+6
|\ | | | | | | | | meson: add tests option See merge request GNOME/json-glib!19
| * meson: add tests optionStéphane Cerveau2020-01-092-1/+6
| | | | | | | | Give an option to meson to disable `tests` build
* | Merge branch 'patch-1' into 'master'Emmanuele Bassi2020-01-101-1/+1
|\ \ | |/ |/| | | | | typo: parser -> parsed See merge request GNOME/json-glib!21
| * typo: parser -> parsedAlexandre Viau2020-01-101-1/+1
|/
* Add Malay translationUmarzuki Bin Mochlis Moktar2020-01-082-0/+282
|
* Merge branch 'wip/nielsdg/add-nullable-serializable-property' into 'master'Emmanuele Bassi2020-01-071-2/+2
|\ | | | | | | | | serializable: Add (nullable) annotation See merge request GNOME/json-glib!18
| * serializable: Add (nullable) annotationNiels De Graef2020-01-071-2/+2
|/ | | | | `json_serializable_serialize_property()` can return NULL, so make that clear in the documentation (and to GIR).
* Merge branch 'msvc-fix' into 'master'Nirbheek Chauhan2019-11-151-1/+1
|\ | | | | | | | | meson: Don't error with MSVC C4819 warning See merge request GNOME/json-glib!17
| * meson: Don't error with MSVC C4819 warningSeungha Yang2019-11-141-1/+1
|/ | | | | | The compiler warning C4819 (encoding related warning) is a trivial thing on non-English locale system. Instead of error out, explicitly specify encoding as "utf-8".
* Update British English translationZander Brown2019-08-301-95/+142
|
* Annotate json_builder_new_immutable()Emmanuele Bassi2019-02-281-1/+1
| | | | | We shouldn't rely on g-ir-scanner doing pattern matching on the name of the function to determine if it's a constructor or not.
* Update Dutch translationNathan Follens2019-02-241-23/+35
|
* Merge branch 'glib-fallback' into 'master'Emmanuele Bassi2019-01-235-17/+22
|\ | | | | | | | | Updates to Meson build system See merge request GNOME/json-glib!13
| * Stop using deprecated 'python3' meson moduleXavier Claessens2019-01-071-1/+1
| |
| * Fix detection of linker argumentsXavier Claessens2019-01-071-5/+5
| |
| * Bump meson version to 0.47.0 for feature optionsXavier Claessens2019-01-071-1/+1
| |
| * Rename 'docs' option to 'gtk_doc'Xavier Claessens2019-01-072-3/+3
| |
| * Change introspection option to feature typeXavier Claessens2019-01-072-3/+3
| |