File Exchange > Data Connector >    JSON Connector

Author:
OriginLab Technical Support
Date Added:
12/20/2018
Last Update:
10/31/2022
Downloads (90 Days):
139
Total Ratings:
1
File Size:
21 KB
Average Rating:
File Name:
JSON Connector.opx
File Version:
1.10
Minimum Versions:
License:
Free
Type:
App
Summary:

Import JSON from a file or web site.

Screen Shot and Video:
Description:

This App connects the Origin project to a JSON file from a file or web site. Origin 2019b or later, required.

Installation
  • This App is pre-installed in Origin. You can launch it from the Data menu or from the App icon on the Connector tab of the Apps Gallery, located at the right-side of the Origin workspace.
  • If you do not see the menu command or App icon, click Data: Connect to File: Add New.... The App Center opens listing only Connector Apps. Click the Download and Install button to install an App.
Features
  • Variable Selection
    You can select some key/value pairs in the file to import and later alter your previous choices. Currently only if the value is an array or value is an object containing key/array pairs can be imported. In the following JSON example, JSON/geometry and JSON/geometry/coordinates both are valid for connector, but JSON/properties not.
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
        ]
      },
      "properties": {
        "prop0": "value0",
        "prop1": 0.0
      }
    }
  • Nested Array
    An nested array is an array whose elements are also arrays. When saving nested array as columns, different arrays (not nested)  are saved into multiple columns. Otherwise the array elements are flattened and saved into one column.
Basic Usage
  1. With the worksheet active, click on the Data menu. If you are connecting to a file on your PC or network, click Connect to File: JSON and open your file. If you are connecting to a web file, choose Data: Connect to Web and enter a URL and click OK.  In the Data Connector Browser dialog, double click on the contents to select your data. Check Nested Array as Columns if necessary, then click OK.
  2. Once a connector is added, click the connector icon in the upper-left corner of the workbook for a popup menu with various commands.
  3. By default, connector-imported data are NOT saved with the project file. To save a workbook's data with the project file, click the connector icon in the upper-left corner for that workbook and uncheck Exclude Imported When Saving. Note that each workbook has its own Exclude setting.

N.B.

  • More features of Origin Data Connector are described here.
  • In Data Connector Browser, if the number of elements in Array/Object is limited to system variables @JTMA and @JTMO.
    • @JTMA denotes the max number of elements in Array to be displayed.
    • @JTMO denotes the max number of elements in Object to be displayed.

Updates:

v1.1 10/31/2022 Supported to import meta data.
v1.01 10/21/2020 Fixed reimport issues.

Reviews and Comments:
07/14/2021morrispangood