Suppress useless slash escaping in json lib

This commit is contained in:
Ondrej Kozina
2018-04-20 13:12:33 +02:00
committed by Milan Broz
parent 5b6f06b2ac
commit a054206d25
4 changed files with 23 additions and 6 deletions

View File

@@ -406,7 +406,8 @@ int LUKS2_disk_hdr_write(struct crypt_device *cd, struct luks2_hdr *hdr, struct
/*
* Generate text space-efficient JSON representation to json area.
*/
json_text = json_object_to_json_string_ext(hdr->jobj, JSON_C_TO_STRING_PLAIN);
json_text = json_object_to_json_string_ext(hdr->jobj,
JSON_C_TO_STRING_PLAIN | JSON_C_TO_STRING_NOSLASHESCAPE);
if (!json_text || !*json_text) {
log_dbg("Cannot parse JSON object to text representation.");
free(json_area);