Import the contents of JSON, UBJSON and ExpressionJSON files as Wolfram Language expressions.

From a File...

Read a JSON file with Import:

If the file names extension is not .json, specify the files type explicitly:

From a File Containing UBJSON...

Read a UBJSON file with Import:

If the file names extension is not .ubj, specify the files type explicitly:

  • UBJSON is a binary format that imitates and is compatible with JSON. It is more compact and more efficient than JSON, but is not human readable.

From a File Containing ExpressionJSON...

Read an ExpressionJSON file with Import:

  • ExpressionJSON provides lossless round-tripping of Wolfram Language expressions to and from JSON.

Notes

Use ImportString to import from a string rather than a file: