From c844563f7d8dcd6c3e629614eb9b69b8a9ff18d3 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 27 Mar 2018 16:08:46 +0200 Subject: [PATCH] Don't warn for // and __ key prefixes This means you can make valid json comments like so: "//": "Some comment", Closes: #122 Approved by: alexlarsson --- src/builder-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/builder-utils.c b/src/builder-utils.c index d9fbec7a..0f5475a8 100644 --- a/src/builder-utils.c +++ b/src/builder-utils.c @@ -1853,7 +1853,9 @@ builder_serializable_find_property_with_error (JsonSerializable *serializable, { GParamSpec *pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (serializable), name); if (pspec == NULL && - !g_str_has_prefix (name, "x-")) + !g_str_has_prefix (name, "x-") && + !g_str_has_prefix (name, "__") && + !g_str_has_prefix (name, "//")) g_warning ("Unknown property %s for type %s", name, g_type_name_from_instance ((GTypeInstance *)serializable)); return pspec; }