summaryrefslogtreecommitdiff
path: root/json-glib
Commit message (Collapse)AuthorAgeFilesLines
* build: Clean up the hard-coded API version numbersEmmanuele Bassi2017-07-102-8/+8
| | | | | | In order to be resilient towards future API bumps, we should have very few places that deal with the API version encoded inside paths and file names.
* build: Move ancillary build scripts to a separate directoryEmmanuele Bassi2017-06-032-22/+0
| | | | | Avoid cluttering the source directories, and makes finding things easier.
* build: Clean up installed tests rulesEmmanuele Bassi2017-06-031-8/+10
| | | | Use variables for common values, instead of duplicating them.
* build: Don't copy test data in the build directoryEmmanuele Bassi2017-04-011-9/+6
| | | | | | GTest can use environment variables to find the test data in the source and build directory, so we don't need to copy files around using Python scripts.
* build: Use the Meson 'python3' moduleEmmanuele Bassi2017-04-011-1/+1
| | | | | | | This allows finding Python3 on Windows, in order to build and run the tests. https://bugzilla.gnome.org/show_bug.cgi?id=780550
* build: Fix the installed test wrapper fileEmmanuele Bassi2017-03-291-1/+1
| | | | | We need to point to the binary, but we're using the wrong name for the Exec key.
* docs: Clarify when NULL might be returnedMatthew Leeds2017-03-181-13/+14
| | | | | | | | | If a JsonObject has no members, json_object_get_members() and json_object_get_values() will return NULL, so this commit makes that behavior clear in the docs. It also adds the (nullable) annotation in a few places in the same file. https://bugzilla.gnome.org/show_bug.cgi?id=769206
* utils/json_from_string: Don't reset user-provided error argumentHeinrich Fink2017-03-181-1/+0
| | | | | | | | In json_from_string, just pass the user-provided GError** to json_parser_load_from_data. Otherwise json_from_string will never propagate any parser errors back to the caller. https://bugzilla.gnome.org/show_bug.cgi?id=766281
* introspection: fix nullable annotation for return values in the following ↵Alberto Ruiz2017-03-185-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | methods json_builder_add_boolean_value json_builder_add_double_value json_builder_add_int_value json_builder_add_null_value json_builder_add_string_value json_builder_add_value json_builder_begin_array json_builder_begin_object json_builder_end_array json_builder_end_object json_builder_get_root json_builder_set_member_name json_generator_get_root json_reader_get_error json_reader_get_member_name json_reader_get_value json_serializable_find_property json_serializable_find_property json_boxed_serialize
* tests: Add unit for JsonReader NULL value checksEmmanuele Bassi2017-03-181-0/+28
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=758580
* reader: Make json_reader_get_value return a value for the null type. This ↵Robert Ancell2017-03-181-1/+1
| | | | | | matches the json_reader_is_value check. https://bugzilla.gnome.org/show_bug.cgi?id=758580
* docs: Fix array subsets descriptionAllin Cottrell2017-03-181-2/+2
| | | | | | | | | | | | | | | The doc for json-glib misstates the meaning of the JsonPath set notation operator, as in $.store.book[0,2] This does not mean elements 0 to 2 (a range) but rather just elements 0 and 2. This is correctly handled in the library; it's just the doc that is wrong. https://bugzilla.gnome.org/show_bug.cgi?id=768788
* docs: Use appropriate markdown for literalsEmmanuele Bassi2017-03-181-8/+8
|
* generator: Avoid multiple buffer allocationsGarrett Regier2017-03-181-187/+67
| | | | | | | Instead share a single GString in all dump functions. https://bugzilla.gnome.org/show_bug.cgi?id=773504
* parser: Use g_steal_pointer()Emmanuele Bassi2017-03-181-8/+2
| | | | | GLib already has a convenient API for stealing pointer values and replacing them with NULL, so let's use it.
* core: Add json_parser_steal_root()Ole André Vadla Ravnås2017-03-182-0/+28
| | | | | | This avoids copying the root node for the parse-to-node use-case. https://bugzilla.gnome.org/show_bug.cgi?id=774688
* core: Optimize json_from_string() to avoid copyOle André Vadla Ravnås2017-03-181-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774688
* Add version macros for 1.4Emmanuele Bassi2017-03-181-0/+16
|
* Drop Autotools build systemEmmanuele Bassi2017-03-183-229/+0
| | | | We use Meson to build JSON-GLib, now.
* Use Unicode in translatable stringsPiotr Drąg2017-03-186-27/+27
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772753
* doc: Use 'plain' language for JSON snippetsEmmanuele Bassi2017-03-181-3/+4
|
* build: Really require the same pkg-config modulesEmmanuele Bassi2017-03-131-1/+1
|
* build: Require the same modules for Meson and AutotoolsEmmanuele Bassi2017-03-132-2/+2
| | | | We depend on gio-2.0, which strings along glib-2.0 and gobject-2.0.
* Fix the generated pkg-config file with MesonEmmanuele Bassi2017-03-131-1/+1
| | | | We need to specify the sub-directory for the inclusion directive.
* build: Add missing argument to the introspection scannerEmmanuele Bassi2017-03-131-10/+16
| | | | | | 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.
* Ensure that introspection scans all the headersEmmanuele Bassi2017-03-131-6/+6
| | | | | We have a couple of generated header files, which means we need to list them as sources for the introspection scanner.
* build: Reduce the internal dependenciesEmmanuele Bassi2017-03-131-8/+10
| | | | | | | 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.
* Add missing header in the Meson file listingEmmanuele Bassi2017-03-131-0/+1
| | | | The single include 'json-glib.h' header is missing.
* Remove dependency on json-version.hEmmanuele Bassi2017-03-131-11/+11
| | | | The file is generated at configuration time.
* Install testsEmmanuele Bassi2017-03-132-1/+41
| | | | | | We should install our tests in order to get them executed in environments like GNOME Continuous and other continuous delivery systems.
* build: install toolsIgor Gnatenko2017-03-131-1/+1
| | | | Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
* Add various compiler and linker flags to the Meson buildEmmanuele Bassi2017-03-131-3/+16
| | | | | | | 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.
* Annotate internal set_error() wrapperEmmanuele Bassi2017-03-131-0/+1
| | | | | | | 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.
* Build API reference with MesonEmmanuele Bassi2017-03-131-1/+1
| | | | | | We can use the gnome module to generate the JSON-GLib API reference. https://bugzilla.gnome.org/show_bug.cgi?id=773603
* Update the Meson buildEmmanuele Bassi2017-03-132-65/+70
| | | | | | Clean up the coding style, and make it a bit more idiomatic. https://bugzilla.gnome.org/show_bug.cgi?id=773603
* meson: Add support for building with the meson build systemThibault Saunier2017-03-133-0/+150
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=773603
* Quell a compiler warningEmmanuele Bassi2017-03-131-1/+1
| | | | Original patch by: Thibault Saunier <tsaunier@gnome.org>
* Don't loose decimal in whole-double -> string conversiondjcb2017-03-133-2/+29
| | | | | | | | | | | | | 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
* json-glib: Remove unused symbolsThibault Saunier2017-03-131-19/+0
| | | | | | Or compilation fails with -Werror https://bugzilla.gnome.org/show_bug.cgi?id=773604
* Stop providing our own marshaller and use the generic oneThibault Saunier2017-03-134-31/+11
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=773603
* Only seal arrays and objects when a parser is immutableEmmanuele Bassi2017-03-131-2/+4
| | | | | | | We seal nodes conditionally on the :immutable property, but we are sealing their contents unconditionally. https://bugzilla.gnome.org/show_bug.cgi?id=779970
* Allow empty string as object member nameDr. David Alan Gilbert2017-03-116-6/+17
| | | | | | | | | | | 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
* Add autoptr clean up definition for JsonSerializableEmmanuele Bassi2017-03-111-0/+4
| | | | | This way developers can use G_DECLARE_INTERFACE with Serializable as a pre-condition.
* json-node: Clarify documentation on JsonNode getters for other typesPhilip Withnall2017-03-021-19/+38
| | | | | | | | | | | | | | 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
* Fix translator commentsPiotr Drąg2017-01-284-7/+7
| | | | They need to be exactly one line above a string to show up in .po files.
* MSVC builds: Improve introspection builds on MSVCChun-wei Fan2016-04-221-2/+24
| | | | | | | 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.
* build: Clean up MSVC-related items in autotools build filesChun-wei Fan2016-04-221-36/+15
| | | | | | | | | 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.
* json-types.h: Add missing JSON_AVAILABLE_IN_1_2Chun-wei Fan2016-04-191-0/+1
| | | | | The json_node_is_immutable() missed an JSON_AVAILABLE_IN_1_2, causing it not to be exported. Fix this.
* node: Turn a g_debug() call into a JSON_NOTEEmmanuele Bassi2016-03-221-1/+8
| | | | | This allows conditional compilation, and it makes the debugging code consistent.
* debug: Add flag for debugging nodesEmmanuele Bassi2016-03-222-2/+4
|