json: Support %% in JSON strings when interpolating
commit8bca4613e6cddd948895b8db3def05950463495b
authorMarkus Armbruster <armbru@redhat.com>
Thu, 23 Aug 2018 16:40:24 +0000 (23 18:40 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 24 Aug 2018 18:26:37 +0000 (24 20:26 +0200)
treeaa40fcc6680538d990066912d52953c85204b8b0
parent16a485992112be1c8b47b58b0124357db9037093
json: Support %% in JSON strings when interpolating

The previous commit makes JSON strings containing '%' awkward to
express in templates: you'd have to mask the '%' with an Unicode
escape \u0025.  No template currently contains such JSON strings.
Support the printf conversion specification %% in JSON strings as a
convenience anyway, because it's trivially easy to do.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-58-armbru@redhat.com>
qobject/json-parser.c
tests/check-qjson.c