If the JSON document contains an empty array [] the following exception is raised
`
org.ojai.exceptions.EncodingException: Unexpected event: END_ARRAY
at org.ojai.util.MapEncoder.encodeArray(MapEncoder.java:102)
at org.ojai.util.MapEncoder.encodeMap(MapEncoder.java:72)
at org.ojai.util.MapEncoder.encode(MapEncoder.java:50)
`
I do not understand why the exception is raised here:
https://github.com/ojai/ojai/blob/v1.0/core/src/main/java/org/ojai/util/MapEncoder.java#L102
Sample code to reproduce:
Document docInArr4 = Json.newDocument(); docInArr4.set("arr4string", "string") .setArray("arr4", new String[]{} ); docInArr4.asMap();
If the JSON document contains an empty array [] the following exception is raised
`
org.ojai.exceptions.EncodingException: Unexpected event: END_ARRAY
`
I do not understand why the exception is raised here:
https://github.com/ojai/ojai/blob/v1.0/core/src/main/java/org/ojai/util/MapEncoder.java#L102
Sample code to reproduce:
Document docInArr4 = Json.newDocument(); docInArr4.set("arr4string", "string") .setArray("arr4", new String[]{} ); docInArr4.asMap();