Questions tagged [json-format]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
53 views

Lists of rules vs. Associations

It seems that generally, Mathematica users (or at least the Q&A I've read here) prefer associations to represent data in ways that many other languages would use structures. However, when ...
0
votes
0answers
16 views

How to specify authenticity of SSL for querying APIs?

While ago I was using this command with no issue, now I have an SSL error: ...
4
votes
2answers
33 views

How to export a list of url strings as a json file?

I want to export a list of url's as a JSON file. For instance: ...
3
votes
1answer
296 views

Visualize JSON timeseries from Fitbit

I'm looking to visualize some Fitbit data which comes in json format (file) . Can someone suggest a nice way to massage this into DateListPlot? ...
11
votes
3answers
518 views

Bug with Json payload with diacritics for HTTPRequest

Working in the creations of APIs with Mathematica 12.2, I got this problem with diacritics when sending JSON data. Here is a toy code using httpbin. ...
4
votes
1answer
203 views

Openning JSON file, (NDJSON, new line delimited) — big file

I am trying since many hours to open a JSON file ("new line delimited") that has this as structure ...
1
vote
0answers
57 views

Importing A Neural Network From Mathematica For Use In R

I am experimenting with platform interoperability between Mathematica and R. My aim is to create an untrained Neural Network using Mathematica, export this network in MXNet format as a .json file, ...
1
vote
1answer
62 views

Export new data in JSON [closed]

While processing data in cycle my code create some json object like this: ...
4
votes
3answers
183 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
4
votes
1answer
91 views

How to return JSON from APIFunction without string encapsulation?

I am trying to get an APIFunction to send valid JSON. This is my demo function. ...
2
votes
0answers
54 views

Import data from a webpage with dynamically generated content

Following the example of this very detailed thread 190177 and others related to the subject, that introduced me to snooping around in the developer's tools, I tried to apply to my case, which is ...
18
votes
2answers
1k views

How to export a notebook to Jupyter?

I would like a tool to convert any Mathematica notebook into a Jupyter labs notebook, preserving as much content as possible (.ipynb files are just special json). Obviously, this would need to ...
4
votes
1answer
154 views

Importing a Part of the JSON

This is JSON I'm trying to work within Mathematica: ...
0
votes
0answers
83 views

How to ImportString “JSON” with Unicode characters? [duplicate]

Update The short answer is that when getting results back from an API into an HTTPResponse object the "Body" property ...
3
votes
0answers
101 views

Slight loss of precision when parsing JSON

Exporting to JSON is working well for me under 11.3. The issue present in previous versions seem to be solved: ...
5
votes
1answer
106 views

How to conditionally escape strings in JSON?

If you JSON export an association with a url, it will espace the forward slashes like this: ...
4
votes
0answers
86 views

Importing and and manipulating large GEOJSON files based on geographic locations

I have large GeoJson data files that I would like to import (i.e. buildings in a city, see image below for data structure) and then "cut out" only the buildings that are within approx. 100 GeoDisks (...
1
vote
1answer
351 views

How to parse complex response from SDMX-JSON endpoint in Mathematica

I am trying to use a datasource that has an SDMX-JSON endpoint. I am currently running my tests on Mathematica 10.3.1 running on 64-bit Linux. I started off by familiarising myself with the tools to ...
1
vote
0answers
102 views
0
votes
0answers
205 views

Export & Import Association with Lists and Rationals without ExpressionJSON

Consider following association: ...
3
votes
2answers
129 views

Importing from an API that has non UTF-8 strings

I am new to both Mathematica and API's. I am trying to access a dictionary of player-ids to names from the website datdota.com, but some of them have chinese characters. relevant code: ...
7
votes
1answer
215 views

Problem to import numbers longer than 19-digit with “JSON” or “RawJSON”

Bug introduced in 11.0.1 or earlier and fixed in 12.0. MMA 11.0.1.0 (Windows 10, 64-bit) I see that "JSON" import can be buggy (154245), so my question is simple: can the following behaviour be ...
8
votes
2answers
241 views

Map Values in 'nested' association

JSON often returns sort of 'nested' associations like so: ...
6
votes
1answer
58 views

Export inserts unwanted characters

I have the following sample JSON file: {"attr1": "Sample with val1"} When I parse it as JSON I get the expected output: ...
1
vote
1answer
272 views

Error: Cannot import data as JSON format, Khan Academy API

Problem context I'm updating my working Mathematica Khan Academy reporting application. Since updating to 11.2 I'm having some errors importing via the Khan Academy API as JSON. Update: This ...
29
votes
3answers
8k views

Who is to blame: parsing UTF8 encoded JSON HTTPResponse fails

Bug introduced in 11.0 or earlier and persists through 12.0 (confirmed by WRI Support but read summary below) Answers summary I think we need a quick summary here to justify keeping bug. Original ...
3
votes
1answer
443 views

Pulling Out Values from JSON Association

Having a bit of trouble pulling a value out of a JSON Association here. I am scraping this website: http://www.msn.com/en-us/money/stockdetails/history/fi-126.1.BY.NYS I want to scrape the closing ...
0
votes
0answers
63 views

Querying the Monero blockchain via JSON-RPC [duplicate]

When querying Monero deamon via JSON-RPC as described in Daemon RPC documentation, via Curl, everithing pass fine : ...
7
votes
3answers
2k views

How to parse JSON

please forgive me if this is obvious, but I have some JSON: ...
9
votes
2answers
485 views

How to extract a value from an XML tree

I am trying to pull out a certain value from an XML tree that I have acquired from a website: ...
4
votes
1answer
462 views

Is it possible to grab all the links at once on a webpage?

I'm working with some webscraping using Mathematica and have run into a question: is it possible to grab all the links on a webpage that scrolls down? The page I am trying to scrape is this: "http://...
1
vote
0answers
231 views

Export number as formatted numeric value, not string

Some related questions include here. Is there a way to format numbers for export in CSV or JSON as numbers - not strings - with a specified number of decimal places and no exponentials? Is output ...
2
votes
2answers
432 views

Using URLFetch/URLExecute to post to an internal server

I've been looking up how to do this for a while and I haven't seen any thorough explanations, just hints. Is there like a secret repository of clearly defined Mathematica code somewhere that I cant ...
4
votes
1answer
91 views

WriteRawJSONString vs ExportString?

What's the difference between Developer`WriteRawJSONString[] and ExportString[]? I see it used a lot but don't see a difference:
0
votes
0answers
66 views

How to interpreter file into date and json?

I have DateAndJson.txt and want to analyse it. ...
6
votes
1answer
356 views

How do I display my weather data in JSON format from Wolfram Mathematica API?

Good day I am trying to display my weather data in a JSON format in order to use it in an iOS app (using swift in Xcode). This is what my code looks like at the moment: ...
6
votes
1answer
4k views

How can I generate a graph from a NetworkX JSON

I have done some network generation and analysis in Python NetworkX. I do most of my visualizations with D3, but for publications I would like to generate some graph plots with Mathematica as well as ...
1
vote
1answer
231 views

How to interpret and extract the information from the JSON (JavaScript Object Notation)? [closed]

How to interpret and extract the information from the JSON (JavaScript Object Notation)? I would extract the information and plot the information graphically. Please advise and comment. Thank you. <...
3
votes
0answers
49 views

Can JLink return a structured object?

What I want to achieve seems obvious but I cannot figure it out: I need to find a way that when I send an expression to be evaluated from a Java back end to a Mathematica kernel, I can live with it ...
7
votes
1answer
860 views

How to get sub property from json result?

I'm brand new to Mathematica and I imported a json: data = ImportString["{\"x\":1,\"y\":1}", "json"] and result: ...
9
votes
2answers
3k views

RawJSON vs JSON format

It has been very recently, since the release of version 10.3.0 I think, that Import/Export and ImportString/ExportString functions accept a format parameter with the value of "RawJSON". The ...
0
votes
0answers
83 views

How to export heterogeneous data to single file?

I want to export structured heterogeneous data (containing images) to some standard file format. The expression to export can contain 3 atomic types: numbers, strings, images, and be nested with 2 ...
2
votes
0answers
108 views

Exporting organization of Mathematica's documentation to a JSON file

In this answer, @Vitaliy Kaurov explores and utilizes new Mathematica's functionality WolframLanguageData: ...
2
votes
0answers
131 views

Is there a way to specify which kernel is used to import files (SOLVED)? [closed]

Following up on a previous question in which I encountered a memory leak in the JSON importer I have created a SandBox script that will run the Import and analysis on a separate kernel, which be ...
5
votes
1answer
602 views

JSON Expandable/Collapsible Fields with OpenerView

When you have a deeply nested hierarchical JSON structure, tools like JSON Editor Online help a lot to get an overview of the structured data at various levels. In this way you control the level-of-...
14
votes
3answers
375 views

Possible memory leak when importing JSON

Bug introduced in 10.0 and persisting though 11.1.1 This problem that I would like to resolve is how to free memory used Import a file when the file is no longer in use. I have a project in which I ...
0
votes
1answer
117 views

How to Export a mixture distribution to .json file

I would like to export the following mixture distribution mathematica found for my dataset to .json file ...
3
votes
2answers
417 views

Why are dictionary keys reordered upon JSON import?

After importing a JSON file, Mathematica changed the order of the fields. For example, I downloaded a sample file from: http://api.openweathermap.org/data/2.5/find?lat=55.5&lon=37.5&cnt=10 I ...
3
votes
2answers
260 views

Format google places JSON output

I'm have some trouble formatting the Output of a 'Import' request. I get this as a return of a google places API request: ...
6
votes
2answers
243 views

JSON export truncates numbers to 6 digits of precision

Update: This problem was fixed in Mathematica 11.3. It seems that in version 10.0.2 and 10.1.0, floating point numbers are truncated to only 6 digits of precision when exporting to JSON. Example: <...