json: Support %% in JSON strings when interpolating

Enterprise / Virtualization / QEMU - Markus Armbruster [redhat.com] - 24 August 2018 18:26 EDT

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.

8bca4613e6 json: Support %% in JSON strings when interpolating
qobject/json-parser.c | 3 ++-
tests/check-qjson.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)

Upstream: git.qemu.org


  • Share