Developing Client Apps (JSON Tables)

As part of its support for JSON tables, MapR-DB implements the OJAI API. MapR-DB also provides a MapR-DB JSON Client API for managing JSON tables. This section describes how to use these APIs to develop client applications that access MapR-DB JSON tables.

The OJAI API provides methods for creating, reading, updating, and deleting JSON documents in MapR-DB JSON tables. MapR-DB provides a Java implementation of the library.

The following shows the general flow for developing an OJAI client application that accesses MapR-DB JSON tables:

  1. Make a connection to MapR-DB using the OJAI Connection and Driver interfaces
  2. Request a MapR-DB JSON table using the JSON DocumentStore
  3. Specify the table, document, or column family operation
  4. Perform the operation on the table
  5. Return the results

To create, drop, and alter MapR-DB JSON tables and column families, MapR-DB provides a MapR-DB JSON Client API, implemented in Java.

You can also use HTTP calls to access MapR-DB JSON tables Using the MapR-DB JSON REST API.

For additional information about OJAI, refer to the following:

API Documentation

The following are links to the detailed API pages:

  • Java OJAI Client API
  • MapR-DB JSON Client API
    Note: Beginning with MapR version 6.0, the MapR-DB Table interface in the MapR-DB JSON Client API is deprecated and replaced by the DocumentStore interface in the OJAI API.