Internal / Draft / Data Manager / Json

Entities

Last updated on 13-Mar-2018 by Thomas P. Boesen
Thomas P. Boesen

Founder
boesen@scifeon.com

Format Description

Each entity is represented by one JS object. The eClass field contains the entity class name. Field-names have their first letter lower-cased. Thus, a sample might be represented as:

This is a simplified example; if you get entities from the server, they will always have more information, e.g. the audit info (created/modified time and user).

Cross-References and Attributes

Associated row of shared types such as cross-references, attributes and tags may be included in the entity, although they need not be:

Other Associated Records

Some entities have specific associated records, e.g. a RackSet has RackTube associated rows. These are represented in the same way:

Parent Records

Steps and Experiments can have a single parent entity, linked by the parentID field.

ResultSets and plates can have multiple parents, and they are listed in the parent array:

WARNING: It's yet undecided whether samples are single- og multi-parent entities

Decimal numbers

All decimal numbers are represented using dot (.) as the decimal separator and without a thousand separator.

Scientific notation can be used, e.g. 1.34E-6.

JSON fields

The content of JSON fields is included in raw form, i.e. not 'escaped', e.g.:

The Content field is a JSON field and the JSON content is stored in a CLOB column in the database. In this case, the Content field in the database would contain:

BLOB fields

BLOB content is serialized as Base64.

Date information

When sent from the server, dates are represented like this:

Date/time values are represented as:

When sending date and date-time information to the server, it will try to make sense of a few other formats, but it's generally recommended to use the formats shown above.

When the field-name ends with 'Date', it's local date. When ending in 'Dti', it local date & time. When ending in 'Utc', it's UTC (GMT).

WARNING: UTC is currently not serialized with a 'Z' suffix - this will be fixed at some later time, so don't rely on it not being there.

We aim to comply with ISO8601, although we are still non-compliant in a few issues (the Z suffix, in particular).