Message Boards Message Boards

0
|
5738 Views
|
7 Replies
|
1 Total Likes
View groups...
Share
Share this post:

JSON Import not working in Mathematica 10

Posted 10 years ago

The documentation for JSON import provides this example:

Import["ExampleData/temperatures.json"]

and shows a successful evaluation as output. However, evaluating this returns Import::fmterr.

If you import the file as Text, you can see it's in proper JSON syntax.

Do any of you have this problem or is it specific to me? I'm on OSX Yosemite.

POSTED BY: Jesse Friedman
7 Replies

I checked and see that there is a current bug reported on this. I added a link to this discussion to that report.

POSTED BY: David Reiss

Hmm. I do not have the time this morning to send in a bug report, but I too have been having problems importing JSON in Mathematica 10. I assumed it was user error or an error in the external file I was attempting to suck in, but now I am wondering if there is an issue. I would appreciate it if someone would take a look. Running OSX 10.9

POSTED BY: Seth Chandler

Is it just for this file or do you get it for an arbitrary JSON file? Either way send in a bug report....

POSTED BY: David Reiss

I originally got the error when attempting to import an external file, and confirmed it by trying with the example file.

POSTED BY: Jesse Friedman

P.S. I am on OSX 10.9.4. Is your Mathematica the released version or is it still a pre-release?

POSTED BY: David Reiss

It's the release.

In[61]:= SystemInformation["Small"]

Out[61]= {"Kernel" -> {"SystemID" -> "MacOSX-x86-64", 
   "ReleaseID" -> "10.0.0.0 (5098698, 5098537)", 
   "CreationDate" -> 
    DateObject[{2014, 6, 29}, TimeObject[{20, 38, 32}]]}, 
 "FrontEnd" -> {"OperatingSystem" -> "MacOSX", 
   "ReleaseID" -> "10.0.0.0 (5098698, 2014062704)", 
   "CreationDate" -> 
    DateObject[{2014, 6, 27}, TimeObject[{23, 17, 40.}]]}}
POSTED BY: Jesse Friedman

It works fine for me Jesse...

In[2]:= SystemInformation["Small"]

Out[2]= {"Kernel" -> {"SystemID" -> "MacOSX-x86-64", 
   "ReleaseID" -> "10.0.0.0 (5098698, 5098537)", 
   "CreationDate" -> 
    DateObject[{2014, 6, 29}, TimeObject[{20, 38, 32}]]}, 
 "FrontEnd" -> {"OperatingSystem" -> "MacOSX", 
   "ReleaseID" -> "10.0.0.0 (5098698, 2014062704)", 
   "CreationDate" -> 
    DateObject[{2014, 6, 27}, TimeObject[{23, 17, 40.}]]}}



In[3]:= Import["ExampleData/temperatures.json"]

Out[3]= {"01/01/09" -> -6.06, "01/02/09" -> -2.83, 
 "01/03/09" -> -4.22, "01/04/09" -> 1.28, "01/05/09" -> -7.17, 
 "01/06/09" -> -4.83, "01/10/09" -> -2.33, "01/07/09" -> -2.5, 
 "01/11/09" -> -7.33, "01/08/09" -> -8.94, "01/12/09" -> -8.11, 
 "01/09/09" -> -6.78, "01/13/09" -> -8.17, "01/14/09" -> -14.11, 
 "01/15/09" -> -20.11, "01/16/09" -> -23.17, "01/17/09" -> -12.67, 
 "01/18/09" -> -9.22, "01/19/09" -> -9.67, "01/20/09" -> -8.67, 
 "01/21/09" -> -7.94, "01/22/09" -> -5.67, "01/23/09" -> -2.89, 
 "01/24/09" -> -11.78, "01/25/09" -> -15.61, "01/26/09" -> -12.89, 
 "01/27/09" -> -10.72, "01/28/09" -> -9.67, "01/29/09" -> -6.56, 
 "01/30/09" -> -10.61, "01/31/09" -> -7.61}
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract