OESequenceMetadataFromJson

Attention

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

bool OESequenceMetadataFromJson(OESequenceMetadata& metadata,
                                const std::string& json)

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

Field

Type

Description

ChainID

string

Chain identifier for this sequence segment.

StartResNum

integer

Residue number of the first residue in the sequence segment.

StartResInsCode

string (single character)

Insertion code of the first residue in the sequence segment.

EndResNum

integer

Residue number of the last residue in the sequence segment.

EndResInsCode

string (single character)

Insertion code of the last residue in the sequence segment.

Sequence

string

One-letter amino acid sequence for this segment.

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.