Robert Heath edited this page Mar 1, 2016 · 3 revisions

The OJAI API library provides a standard for creating, reading, updating, and deleting unstructured, semi-structured, and structured data that resides in documents. OJAI documents are based on the JSON data model, supporting all data types that are natively supported by JSON and supporting a number of other data types in addition.

For this 1.0 release, uses of OJAI are restricted to the reference implementation that is included in the OJAI library and to MapR's implementation of OJAI for MapR-DB. The reason for this restriction is that OJAI does not yet provide means of creating connections to document stores.

Starting with the 2.0 release, you will be able to write implementations to work with OJAI documents in any document store, such as MapR's MapR-DB, MongoDB, Apache Drill, and relational databases.

The OJAI API library is organized into two primary categories: interfaces for working with documents, and interfaces for working with document stores. The first category is subdivided into interfaces that use a DOM-based model that is appropriate for working with small to medium-sized documents, and interfaces that use an event-driven model that allows for high-performance actions on large documents.

The reference implementation that is included in the OJAI library implements the first category of interfaces: those for working with documents. The implementation lets you create, read, modify, and view JSON documents in memory. These features are illustrated with a number of code samples.

After reading this guide to the OJAI API library, you can refer to the Javadoc for more details.