From 767a23904b6a975d678fe4714202230e2c9356d5 Mon Sep 17 00:00:00 2001 From: Eli Sherer Date: Tue, 6 Aug 2024 00:16:52 +0300 Subject: [PATCH] 0.2.4 - fixes to and, avg and flatten functions --- java/json-transform/build.gradle | 2 +- .../jsontransform/functions/TransformerFunctionFlatten.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/json-transform/build.gradle b/java/json-transform/build.gradle index 0d5a299..b67b8bd 100644 --- a/java/json-transform/build.gradle +++ b/java/json-transform/build.gradle @@ -9,7 +9,7 @@ plugins { } group 'co.nlighten' -version = '0.2.3' +version = '0.2.4' ext { gsonVersion = "2.10.1" diff --git a/java/json-transform/src/main/java/co/nlighten/jsontransform/functions/TransformerFunctionFlatten.java b/java/json-transform/src/main/java/co/nlighten/jsontransform/functions/TransformerFunctionFlatten.java index bd336c6..1e3c90c 100644 --- a/java/json-transform/src/main/java/co/nlighten/jsontransform/functions/TransformerFunctionFlatten.java +++ b/java/json-transform/src/main/java/co/nlighten/jsontransform/functions/TransformerFunctionFlatten.java @@ -59,7 +59,7 @@ private JE flatten(JE source, JO target, String prefix, String arrayPrefix) { for (var i = 0; i < size; i++) { flatten(adapter.jArray.get(ja, i), target, (prefix == null ? "" : (prefix + ".")) + arrayPrefix + i, arrayPrefix); } - } else { + } else if (prefix != null) { adapter.jObject.add(target, prefix, ja); } } else {