From b235644575a989c77520de9702dd8bd09e1ef4f5 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 15 Aug 2025 12:54:13 -0700 Subject: [PATCH] expand leaf containers in text set serialization --- src/Main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.cc b/src/Main.cc index 6a02f5f4..0a924b75 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -1892,7 +1892,7 @@ Action a_decode_text_archive( ts = make_unique(data, args.get("big-endian"), is_sjis); } phosg::JSON j = ts->json(); - string out_data = j.serialize(phosg::JSON::SerializeOption::FORMAT | phosg::JSON::SerializeOption::ESCAPE_CONTROLS_ONLY); + string out_data = j.serialize(phosg::JSON::SerializeOption::FORMAT | phosg::JSON::SerializeOption::ESCAPE_CONTROLS_ONLY | phosg::JSON::SerializeOption::EXPAND_LEAF_CONTAINERS); write_output_data(args, out_data.data(), out_data.size(), "json"); }); Action a_encode_text_archive( @@ -1932,7 +1932,7 @@ Action a_decode_unicode_text_set( "decode-unicode-text-set", nullptr, +[](phosg::Arguments& args) { UnicodeTextSet uts(read_input_data(args)); phosg::JSON j = uts.json(); - string out_data = j.serialize(phosg::JSON::SerializeOption::FORMAT | phosg::JSON::SerializeOption::ESCAPE_CONTROLS_ONLY); + string out_data = j.serialize(phosg::JSON::SerializeOption::FORMAT | phosg::JSON::SerializeOption::ESCAPE_CONTROLS_ONLY | phosg::JSON::SerializeOption::EXPAND_LEAF_CONTAINERS); write_output_data(args, out_data.data(), out_data.size(), "json"); }); Action a_encode_unicode_text_set(