Skip to content

Commit

Permalink
CLDR-17171 v44 JSON: don't emit {} for space replacement (unicode-org…
Browse files Browse the repository at this point in the history
…#3358)

Punt a better fix to CLDR-17186

(cherry picked from commit 9df3a18)
  • Loading branch information
srl295 authored and pedberg-icu committed Oct 31, 2023
1 parent d197070 commit f7c551c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2264,9 +2264,16 @@ private void writeLeafNode(
// out.name(objName);
if (value.isEmpty()) {
if (valueIsSpacesepArray) {
// empty value, output as empty space-sep array: []
out.getAsJsonObject().add(objName, new JsonArray());
} else {
out.getAsJsonObject().add(objName, new JsonObject());
// empty value.
if (objName.endsWith("SpaceReplacement")) { // foreignSpaceReplacement or
// nativeSpaceReplacement
out.getAsJsonObject().addProperty(objName, "");
} else {
out.getAsJsonObject().add(objName, new JsonObject());
}
}
} else if (type == RunType.annotations || type == RunType.annotationsDerived) {
JsonArray a = new JsonArray();
Expand Down

0 comments on commit f7c551c

Please sign in to comment.