OEStructureMetadataFromJson

Attention

This API is currently available in C++ and Python.

bool OEStructureMetadataFromJson(OEStructureMetadata& metadata,
                                 const std::string& json)

Populates an OEStructureMetadata object from a JSON-formatted string. The function recognizes the following top-level fields in the JSON object:

Field

Type

Description

StructureID

string

Identifier for the structure (e.g. PDB accession code).

Author

string

Name of the structure’s depositing author.

Keywords

array of strings

Keywords describing the structure.

RevisionDate

string

Date of the most recent revision.

Revision

string

Revision version label.

ExperimentDate

string

Date the experiment was performed.

ExperimentType

string

Experiment method name, resolved via OEGetExperimentTypeID.

IridiumData

object

Nested object containing Iridium quality assessment data.

SequenceMetadata

array of objects

Array of sequence segment objects, each parsed according to the fields documented in OESequenceMetadataFromJson.

HeterogenMetadata

array of objects

Array of heterogen objects, each parsed according to the fields documented in OEHeterogenMetadataFromJson.

Unrecognized or missing fields are silently ignored. Returns true if the JSON string was successfully parsed as an object; returns false if the string is not valid JSON or does not represent a JSON object.