Skip to main content

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
5 votes
1 answer
328 views

GeoJSON Problems - UK Parliamentary Constituencies

I want to plot the new parliamentary boundaries for the upcoming general election. This will use an NIHR API to grab the map location of the FID=3, the 3rd parliamentary constituency in alphabetical ...
Tomi's user avatar
  • 4,768
5 votes
1 answer
289 views

Making Adjacency Matrix from Maps

I want to make an adjacency matrix for the world/each country at a specified administrative level. This is very easy to do for countries in Mathematica, but is not straightforward for different ...
Teg Louis's user avatar
5 votes
2 answers
149 views

How to export a correct .json file [closed]

This is my current code: ...
yode's user avatar
  • 27.2k
1 vote
0 answers
107 views

Convert CSV to JSON

I'd like to convert some csv data to json. The CSV: ...
wmv's user avatar
  • 379
6 votes
1 answer
213 views

Exporting results containing Entities to JSON?

I am looking for a straightforward way to export results from functions like ImageContents, FacialFeatures, and WolframAlpha - symbols that return stuff containing knowledgebase content. Aside from ...
M.R.'s user avatar
  • 31.8k
0 votes
2 answers
197 views

How to create a Dataset from Nested JSON Data?

I'm importing data from Swarm into Mathematica, and I'm trying to create a dataset and having issues because the values are at different levels: ...
Steven Buehler's user avatar
3 votes
1 answer
2k views

How can I resolve an unexpected character error when trying to import selected data from a large JSON file?

I'm downloading this datafile from kaggle. I want to get all the IDs. Normally for a JSON file I'd write ...
Tomi's user avatar
  • 4,768
0 votes
1 answer
610 views

Converting JSON to CSV but the formatting is not correct

I have a folder of about a million JSON files and I wrote this to convert them quickly to CSV, but the formatting is not correct for the software I'm feeding them into. Here's the code I'm using: <...
Nothingtoseehere's user avatar
0 votes
0 answers
33 views

FaceFeatures - How to better customise the details of JSON output file?

I am using FacialFeatures to identify the age and gender of characters in movie frames. I am using the following script (simplified from this source): ...
HugoRD's user avatar
  • 17
5 votes
0 answers
618 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 ...
John's user avatar
  • 2,543
0 votes
0 answers
39 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: ...
user305883's user avatar
4 votes
2 answers
301 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: ...
Conor Cosnett's user avatar
3 votes
1 answer
378 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? ...
Yaroslav Bulatov's user avatar
12 votes
3 answers
884 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. ...
Murta's user avatar
  • 26.4k
4 votes
1 answer
857 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 ...
Kass's user avatar
  • 671
1 vote
0 answers
82 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, ...
isaac5122's user avatar
  • 847
1 vote
1 answer
137 views

Export new data in JSON [closed]

While processing data in cycle my code create some json object like this: ...
Kirill Saleev's user avatar
4 votes
3 answers
335 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
M.R.'s user avatar
  • 31.8k
4 votes
1 answer
153 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. ...
Chris Degnen's user avatar
  • 31.3k
2 votes
0 answers
77 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 ...
Κωστής Καρβουνιάρης's user avatar
23 votes
2 answers
3k 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 ...
M.R.'s user avatar
  • 31.8k
4 votes
1 answer
171 views

Importing a Part of the JSON

This is JSON I'm trying to work within Mathematica: ...
Pavel Klymenko's user avatar
1 vote
0 answers
112 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 ...
Edmund's user avatar
  • 43.2k
3 votes
0 answers
198 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: ...
Gustavo Delfino's user avatar
5 votes
1 answer
158 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: ...
M.R.'s user avatar
  • 31.8k
4 votes
0 answers
129 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 (...
Naomi's user avatar
  • 41
1 vote
1 answer
511 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 ...
user391035's user avatar
1 vote
0 answers
146 views

Take a JSON object from an expression and convert it into an association?

...
treadstone's user avatar
0 votes
0 answers
360 views

Export & Import Association with Lists and Rationals without ExpressionJSON

Consider following association: ...
Hotschke's user avatar
  • 707
3 votes
2 answers
176 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: ...
Matthew Rivers's user avatar
7 votes
1 answer
484 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 ...
garej's user avatar
  • 4,885
8 votes
2 answers
262 views

Map Values in 'nested' association

JSON often returns sort of 'nested' associations like so: ...
iot's user avatar
  • 619
6 votes
1 answer
72 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: ...
Shredderroy's user avatar
  • 5,371
1 vote
1 answer
306 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 ...
Matt Green's user avatar
34 votes
3 answers
10k 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 ...
Kuba's user avatar
  • 138k
3 votes
1 answer
592 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 ...
Vic Jongmin Youn's user avatar
0 votes
0 answers
72 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 : ...
Dragutin's user avatar
  • 930
9 votes
3 answers
3k views

How to parse JSON

please forgive me if this is obvious, but I have some JSON: ...
Joe Blow's user avatar
  • 417
9 votes
2 answers
559 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: ...
Vic Jongmin Youn's user avatar
5 votes
1 answer
669 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://...
Vic Jongmin Youn's user avatar
1 vote
0 answers
471 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 ...
alancalvitti's user avatar
  • 15.2k
2 votes
2 answers
574 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 ...
Joe Blow's user avatar
  • 417
4 votes
1 answer
103 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:
M.R.'s user avatar
  • 31.8k
0 votes
0 answers
73 views

How to interpreter file into date and json?

I have DateAndJson.txt and want to analyse it. ...
partida's user avatar
  • 6,866
6 votes
1 answer
395 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: ...
Aletta Klopper's user avatar
6 votes
1 answer
7k 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 ...
Aaron Bramson's user avatar
1 vote
1 answer
272 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. <...
madeinQuant's user avatar
3 votes
0 answers
61 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 ...
user1445138's user avatar
7 votes
1 answer
1k 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: ...
Sayalic's user avatar
  • 891
10 votes
2 answers
6k 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 ...
Athanassios's user avatar
  • 1,301