I am trying to import a 46Mb json file into mathematica (which by the way I exported using mathematica) but its failing with the following messages:
Java::pexcptn: A Java exception occurred after the result was returned to Mathematica: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:216)
at java.lang.StringBuffer.toString(StringBuffer.java:585)
at org.json.JSONTokener.nextString(JSONTokener.java:250)
at org.json.JSONTokener.nextValue(JSONTokener.java:316)
at org.json.JSONObject.<init>(JSONObject.java:190)
at org.json.JSONTokener.nextValue(JSONTokener.java:319)
at org.json.JSONObject.<init>(JSONObject.java:205)
at org.json.JSONTokener.nextValue(JSONTokener.java:319)
at org.json.JSONArray.<init>(JSONArray.java:120)
at org.json.JSONTokener.nextValue(JSONTokener.java:322)
at org.json.JSONObject.<init>(JSONObject.java:205)
at org.json.JSONTokener.nextValue(JSONTokener.java:319)
at org.json.JSONArray.<init>(JSONArray.java:120)
at org.json.JSONTokener.nextValue(JSONTokener.java:322)
at System.Convert.JSONDump.jDecodeJSONString(JSONDump.java:79).
(full msg: https://i.sstatic.net/x5NJp.png)
How can I import the file? Is there another format I should use for large files in json? (I have tried .dat and other formats, but they seem to loose the json structure information) (or should I just not use json for large collections of data?)