-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I am getting a java error with the following json data:
{"count": 10, "results": [{"id": "1976BELGRA00144", "name":""}, {"id": "1976BANGKO14711"}, {"id": "1977BANGKO25619"}, {"id": "P750089-0780"}, {"id": "1973LONDON10203"}, {"id": "1978USNATO07178"}, {"id": "1974STATE096615"}, {"id": "1978SALTT A-2053_4"}, {"id": "1976NATO04964"}, {"id": "1979LAGOS02592"}], "page_size": 10}
All the other json data I've tried work with the command. Also if I add a new field in one of the results, the command works fine. So this json data works:
{"count": 10, "results": [{"id": "P760163-2020", "name":""}, {"id": "1976STOCKH04986"}, {"id": "1978WELLIN00675"}, {"id": "Clinton-76861"}, {"id": "1975LONDON18839"}, {"id": "CAB_24_29_0_0062"}, {"id": "1975STATE001926"}, {"id": "P840139-0646"}, {"id": "1975STATE282895"}, {"id": "1976UDORN06377"}], "page_size": 10}
Here is the error:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.stata.Javacall.load(Javacall.java:130)
at com.stata.Javacall.load(Javacall.java:90)
Caused by: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at org.paces.Stata.Input.FlatJSON.flatten(FlatJSON.java:216)
at org.paces.Stata.Input.FlatJSON.flatten(FlatJSON.java:199)
at org.paces.Stata.Input.FlatJSON.flatten(FlatJSON.java:121)
at org.paces.Stata.Input.InJSON.insheetUrl(InJSON.java:134)