Skip to content

Home

Introduction

Development

IDEs

Services

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

examples Package: Reading and writing large JSON files using JSON cursors

JSON cursors are typically used when reading large JSON data sets. The examples package demonstrates how to use JSON input and output cursors; simply check out the services under the jsonCursor.input and jsonCursor.output packages.

Service Description
ReadAndWriteSimpleJson.gloop Creates an input cursor from a JSON string and maps it to another JSON output cursor.
WriteComplexJson.gloop Shows how to use Gloop JSON output cursors.

Related articles

Please see the following articles for more information:

Try it!

Under the Navigator, expand the examples package and navigate to the code folder. Afterwards, look for the jsonCursor package. This package contains the models and Gloop services shown below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
examples
├── ...
└── code
    └── jsonCursor
        ├── input
        │   └── ReadAndWriteSimpleJson.gloop
        ├── model
        │   ├── Header.model
        │   ├── Record.model
        │   └── Trailer.model
        └── output
            └── WriteComplexJson.gloop

Open to inspect and run the jsonCursor.input.ReadAndWriteSimpleJson.gloop service to learn how JSON input cursors work; jsonCursor.output.WriteComplexJson.gloop service for JSON output cursors. Line and service comments are provided in all of the services for further explanation.

Explanation

Reading a large JSON file could potentially take some time and memory to process. The example services provided shows how fast it is to read a large JSON file using JSON cursors.