JSON (JavaScript Object Notation) is a lightweight data-interchange format. The Stackexchange API delivers its data using this format. The tags is meant for questions about reading and interpreting JSON.

learn more… | top users | synonyms

21
votes
2answers
2k views

Extracting values from nested rules in JSON data

I have been using Mathematica to analyse some data from the StackExchange API. It is conveniently available in JSON form, which Mathematica interprets as replacement rules. However, some of the rules ...
20
votes
1answer
723 views

xkcd: Geohashing in Mathematica

On May 21, 2008, an xkcd comic proposed a method for creating a random, local meeting place that can't be determined until the day of the meeting. This method is usually used for xkcd fan events, ...
15
votes
1answer
450 views

Export dataset to JSON

I'm experiencing a weird issue. Consider a dataset defined like this: dataset = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 3, "b" -> 4|>}]; ...
13
votes
1answer
3k views

How to request financial data from Yahoo's YQL and Quandl?

How can I download historical data from Yahoo ? Although Mathematica's FinancialData function uses Yahoo it could be useful to have more control on how to retrieve data from Yahoo's YQL. Edit ...
12
votes
3answers
234 views

Wrong numerical value while exporting to a JSON string

The following code: ExportString[{"a" -> 2000000., "b" -> 0.000001}, "JSON"] Gives the results ...
8
votes
2answers
487 views

Exporting held expressions through JSON

Trying to round-trip expressions through JSON, I'm getting unexpected errors for held expressions, and would be grateful for advice or clues. Consider, first, something that works well ...
8
votes
1answer
412 views

How to import a large (~50Mb) json file in mathematica

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: ...
6
votes
1answer
468 views

Efficient JSON parser for Mathematica

Im looking for a efficient way of parsing JSON data in Mathematica. I am having a lot of problems with ImportString because it uses Java, is too slow, and uses too ...
5
votes
1answer
809 views

Importing specific elements from JSON

I'm having trouble importing JSON in the way I expect, based on my reading of the documentation. The particular issue I'm having is with importing a specific element, or list of elements. From the ...
5
votes
0answers
154 views

ImportString JSON possible bug

My problem is when I catch up some json output of whatever method and process it with ImportString[%, "JSON"], The first time ...
3
votes
1answer
2k views

How can I create an empty JSON object?

For creating non-empty object, I use following syntax ExportString[{"key" -> "value"}, "JSON"] (*{"key" : "value"}*) But how can I create an empty object? ...
2
votes
1answer
41 views

How to prevent ExportString from reencoding diacritics when exporting as JSON

I'm not sure if it's a bug with Mathematica or if I'm missing something, but when trying to ExportString a UTF-8 string with diacritics as JSON, it's messing up the ...
2
votes
0answers
95 views

Export to JSON format specifically for MongoDB

It is a nice thing that, if you have a data as a list of rules (even nested), Mathematica can export them in JSON format. After generating useful data in Mathematica, Therefore, it seems it ought to ...
1
vote
2answers
34 views

Import nested JSON file [duplicate]

For a project where I receive JSON messages from a web server I was trying to convert these messages into a format that can be used easily within Mathematica. Because JSON also consists of key-value ...
1
vote
1answer
94 views

A bug won't let me import JSON files

I have been working on a project and I have been using JSON to build some networks, the code I use is: ...
1
vote
0answers
126 views

JSON problem? MMA10, Windows 7 or Linux Mint

I want to test Mathematica 10 to import various data format. In this case, I have a JSON file with the following data and structure: ...
0
votes
0answers
38 views

Mathematca terminates internet connection when window is minimized

I wrote a short program which is collecting (and then plotting) data from internet. When I literally don't see, Mathematica stops collecting data and when I maximize window again, it continues. Can ...