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 |
|---|---|---|
|
string |
Chain identifier for this sequence segment. |
|
integer |
Residue number of the first residue in the sequence segment. |
|
string (single character) |
Insertion code of the first residue in the sequence segment. |
|
integer |
Residue number of the last residue in the sequence segment. |
|
string (single character) |
Insertion code of the last residue in the sequence segment. |
|
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.
See also
OESequenceMetadataToJsonfunctionOESequenceMetadataclass