Skip to content

Commit

Permalink
CLDR-17171 v44 JSON: don't emit {} for space replacement (#3358)
Browse files Browse the repository at this point in the history
Punt a better fix to CLDR-17186
  • Loading branch information
srl295 authored Oct 23, 2023
1 parent 7dbac53 commit 9df3a18
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 9df3a18

Please sign in to comment.