Convert DTA to JSON
Turn DTA files into JSON. An array with one object per case keyed by variable name, with floating-point numbers written as decimals such as 34.0 and empty values as null.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop DTA files on the dialor turn it to pick what to do
Stata data as plain JSON.One object per case, keyed by variable name, in a single JSON file.
What you get
A JSON array with one object per case. Each object uses the variable names as keys, so every row of the dataset reads as a record you can pass to any API or script.
Floating-point numbers are written as decimals, such as 34.0. Empty values become null.
What it leaves behind
Value labels, variable labels and missing-value definitions are dropped. Coded answers stay numbers, so a variable that stores 1 for yes and 2 for no gives you 1 and 2, not the words.
Keep the codebook from your DTA file if you need to look up what the codes mean.
When it stops
A file that cannot be parsed stops the conversion with
input_corrupted. This means the DTA file is damaged or is not a readable Stata dataset.The conversion has no options. It always gives one file.
DTA and JSON.What each format is.
The formats
Stata Data
Stata datasets.
- Extensions
- .dta
- MIME type
- application
/x -stata -dta - Kind
- Text and data
JSON
JSON, the data format of every API.
- Extensions
- .json
- MIME type
- application
/json - Kind
- Text and data
In your code.The same DTA to JSON conversion through the API, for your app or your agent.
$ cv convert report.dta report.json$ cv convert report.dta report.jsonQuestions.What people ask about DTA to JSON.
No. Value labels are dropped, so coded answers stay numbers.
Empty values are written as null.
No. Variable labels and missing-value definitions are dropped. Only the variable names remain, as the keys of each object.
The DTA file could not be parsed. The conversion stops and no JSON is made.