summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* get_*_member(): document more error casesobject_get-with-wrong-typesWill Thompson2018-06-051-6/+11
|
* get_*_member_with_default(): return default for non-scalar valuesWill Thompson2018-06-052-7/+13
| | | | | | This is the existing behaviour, with a g_critical() removed, and is consistent with the case when the value is `null` (though not with the case where it is a wrongly-typed non-`null` scalar).
* Document and test get_*_member_with_default() furtherWill Thompson2018-06-052-4/+35
| | | | | | | In the case where the key exists, is non-null, and is scalar, json_object_get_*_member_with_default() defers to json_node_get_*(). These functions implement a variety of type coercions. Test these, and refer to them in the documentation.
* Update French translationCharles Monzat2018-05-311-59/+75
|
* Update Chinese (China) translationMingcong Bai2018-05-211-21/+34
|
* Update Swedish translationAnders Jonsson2018-05-201-44/+56
|
* Update Indonesian translationKukuh Syafaat2018-05-061-45/+57
|
* Updated Spanish translationDaniel Mustieles2018-04-251-69/+57
|
* Updated Czech translationMarek Cernocky2018-04-241-46/+58
|
* Added Slovenian translationMatej Urbančič2018-04-231-45/+57
|
* Update Friulian translationFabio Tomat2018-04-231-44/+56
|
* Update Romanian translationDaniel Șerbănescu2018-04-171-17/+30
|
* Update Croatian translationgogo2018-04-161-18/+31
|
* Update Romanian translationDaniel Șerbănescu2018-04-091-89/+94
| | | | (cherry picked from commit 8b52960e83328b68e01639f0f112cc3a2d1529e2)
* Add Croatian translationgogo2018-03-162-0/+265
| | | | (cherry picked from commit 3d7952f80d70b138ce5fadab34449b573742d34a)
* Update Hungarian translationBalázs Úr2018-03-151-70/+57
|
* Merge branch 'wip/rishi/24-doc-fix' into 'master'Emmanuele Bassi2018-03-141-14/+24
|\ | | | | | | | | | | | | docs: Clarify some expections of the json_object_get_*_member APIs Closes #24 See merge request GNOME/json-glib!9
| * docs: Clarify some expections of the json_object_get_*_member APIsDebarshi Ray2018-03-141-14/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | It is an error to use the following with a missing member: • json_object_get_int_member • json_object_get_double_member • json_object_get_boolean_member • json_object_get_null_member • json_object_get_string_member • json_object_get_array_member • json_object_get_object_member Doing so will lead to CRITICALs like these: Json-CRITICAL **: json_object_get_string_member: assertion 'node != NULL' failed Instead one of these should be used to determine the existence of the member: • json_object_get_member • json_object_has_member Or, when available, one can use the corresponding json_object_get_<type>_member_with_default. https://gitlab.gnome.org/GNOME/json-glib/issues/24
* Update Polish translationPiotr Drąg2018-03-131-46/+58
|
* ci: Add redhat-rpm-config to the dependenciesEmmanuele Bassi2018-03-131-1/+1
| | | | | Otherwise gobject-introspection will fail to build because Python's distutils are terrible.
* ci: Add a dist jobEmmanuele Bassi2018-03-131-0/+15
| | | | | | | | | Whenever we push a tag, we want to create a distributable archive for json-glib; this will automate the release process. Ideally, in the future, we'll have the ability to upload the release archive straight to download.gnome.org, but for now store the archive and the generated API reference as CI artefacts.
* ci: Update the build jobEmmanuele Bassi2018-03-131-6/+13
| | | | | | | | | Improve the CI environment for json-glib: - build the documentation - use `meson test` instead of `ninja test` - store the logs on failure - do not install the result
* docs: Remove mention of `mesontest`Emmanuele Bassi2018-03-131-1/+1
| | | | The `mesontest` binary is deprecated, and replaced by `meson test`.
* Refresh the build systemEmmanuele Bassi2018-03-135-131/+151
| | | | | | | | | | We should use more idiomatic Meson: - improve the coding style - ensure that the `json_glib_dep` dependency object also includes the introspection data, if enabled - add a separate option for the man page generation - ensure that json-glib can be used as a subproject
* Remove unnecessary release scriptEmmanuele Bassi2018-03-131-19/+0
| | | | Meson generates a `dist` target, now.
* Drop unnecessary build-api wrapperEmmanuele Bassi2018-03-131-156/+0
| | | | All the build environments know how to build with Meson, now.
* Add `--output` option to json-glib-formatEmmanuele Bassi2018-03-132-11/+49
| | | | | | We should allow redirecting the output of the format utility to a file, instead of dumping everything on the standard output. This makes it easier to use json-glib-format inside a build system or a CI pipeline.
* Update Chinese (Taiwan) translationChao-Hsiung Liao2018-03-101-75/+81
|
* Remove po/MakevarsPiotr Drąg2018-02-211-9/+0
| | | | Meson doesn’t use it, and Damned Lies learned to read po/meson.build.
* Update Occitan translationCédric Valmary2018-01-281-132/+163
|
* ci: Update the build instructions…Emmanuele Bassi2017-12-152-1/+3
| | | | … And show a fancy badge.
* Merge branch 'get-with-default' into 'master'Emmanuele Bassi2017-12-157-90/+211
|\ | | | | | | | | | | | | Add JsonObject getters with fallback value Closes #4 See merge request GNOME/json-glib!4
| * Add with_default() variant for JsonObject gettersEmmanuele Bassi2017-11-144-89/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the typed getters for JsonObject, the existing API will automatically fail if the member requested is not present. This is generally good practice, because JSON data typically does not have a schema, and thus is has to be validated "on the go"; a JSON object member that contains `null`, or `0`, or `false`, is indistinguishable from a JSON object member that does not exist, so we cannot simply return a scalar value and be done with it. We can provide an escape hatch, though, for the crowd writing parsers for JSON data; by using Python as the model, we can add methods that take a default value as a parameter, and return it as a fallback value if the requested object member does not exist, or if it's set to `null`.
| * Open the development cycle towards 1.6Emmanuele Bassi2017-11-143-1/+25
| |
* | Merge branch 'leak-fix' into 'master'Emmanuele Bassi2017-12-154-1/+7
|\ \ | | | | | | | | | | | | Leak fix See merge request GNOME/json-glib!6
| * | tests: Fix some memory leaks in the testsPhilip Withnall2017-12-153-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can’t do this by porting to g_autoptr(), because json-glib needs to be buildable using MSVC. Sad panda. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/json-glib/issues/30
| * | json-parser: Fix a memory leak on two error handling pathsPhilip Withnall2017-12-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Small leak. With some additional fixes to the tests themselves, this makes all the tests run valgrind-clean. (See the following commit.) Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/json-glib/issues/30
* | | Merge branch 'parsing-empty-string' into 'master'Emmanuele Bassi2017-12-152-10/+31
|\ \ \ | |/ / |/| | | | | | | | json-parser: Fix getting immutable root nodes from empty input See merge request GNOME/json-glib!8
| * | json-parser: Fix getting immutable root nodes from empty inputPhilip Withnall2017-12-152-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If parsing an empty document, it’s allowed to return NULL from json_parser_get_root(). This was broken for immutable parsers when immutability support was added (an assertion fails). Fix that, and also document that json_parser_get_root() may return NULL. Do the same for json_parser_steal_root() too, which is another way that the root node may be NULL. Add a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | | Merge branch 'node-docs-fix' into 'master'Emmanuele Bassi2017-12-151-19/+33
|\ \ \ | |/ / |/| | | | | | | | json-node: Clarify documentation regarding programmer errors See merge request GNOME/json-glib!7
| * | json-node: Clarify documentation regarding programmer errorsPhilip Withnall2017-12-151-19/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | Despite my efforts in commit 011c1e424b7 (parts of which were completely incorrect), the JsonNode documentation still wasn’t particularly helpful about differentiating between methods which return NULL if the JsonNode is not of the right type, and methods which emit a critical warning. Try and improve that across the board, hopefully without saying blatantly incorrect things this time. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | Merge branch 'json-node-autoptr' into 'master'Emmanuele Bassi2017-12-061-1/+1
|\ \ | | | | | | | | | | | | node: Use json_node_unref for the JsonNode autoptr cleanup See merge request GNOME/json-glib!5
| * | node: Use json_node_unref for the JsonNode autoptr cleanupRobert Ancell2017-12-061-1/+1
|/ / | | | | | | | | | | json_node_unref was added after the autoptr macros were written. This fixes an assertion failure if using autoptr and json_node_ref.
* | Merge branch 'json-glib_repro_build_fix' into 'master'Emmanuele Bassi2017-11-141-1/+1
|\ \ | |/ |/| | | | | | | | | Update json-enum-types.h.in to improve reproducibility of the build. See merge request GNOME/json-glib!3 Fixes issue #29
| * Update json-enum-types.h.inRavish Bhatia2017-11-141-1/+1
|/
* Add Dutch translationNathan Follens2017-11-052-0/+271
|
* Merge branch 'issue-28' into 'master'Emmanuele Bassi2017-11-045-32/+35
|\ | | | | | | | | | | | | Use fuzzy comparisons for floating point values Closes #27 and #28 See merge request GNOME/json-glib!2
| * Use fuzzy comparison for floating point valuesEmmanuele Bassi2017-11-044-32/+14
| | | | | | | | | | | | Direct comparison should never be used for floating point values. Fixes #27 and #28.
| * Add float comparison utility macros for testsEmmanuele Bassi2017-11-041-0/+21
|/ | | | | We do compare floating point values elsewhere in our code, so we should ensure that we're doing that with a certain amount of fuzziness.
* Update zh_CN translationMingcong Bai2017-10-211-78/+85
|