Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error When Deserializing Json Array

    I'm trying to use jsonio to deserialize json data from a file (output.json), but Stata returns an error if my data is in an array (starts and ends with square brackets). I ran -jsonio kv, file(output.json) nourl- and got the following error:

    Code:
    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.util.NoSuchElementException
            at java.base/java.util.LinkedList.removeFirst(Unknown Source)
            at java.base/java.util.LinkedList.pop(Unknown Source)
            at org.paces.Stata.Input.FlatJSON.checkName(FlatJSON.java:441)
            at org.paces.Stata.Input.FlatJSON.flatten(FlatJSON.java:181)
            at org.paces.Stata.Input.FlatJSON.flatten(FlatJSON.java:121)
            at org.paces.Stata.Input.InJSON.insheetFile(InJSON.java:155)
            ... 6 more
    Any help would be much appreciated. Thanks!

Working...
X