oci-spec
oci-spec is a library for Serialize/Deserialize oci-runtime-spec and oci-image-spec config.
Usage
Deserialize oci-runtime-spec
Use load of Spec to deserialize oci-runtime-spec config.
If it is a required item in oci-runtime-spec but there is no value in JSON, an error will occur. Also if there is no JSON value in the optional item in oci-runtime-spec, None will be set.
For example, ociVersion is a required item in oci-runtime-spec, but if ociVersion does not exist in JSON, an error occurs.
Although root is an object type and internally has a required path, no error occurs even if there is no value in JSON.
However, if root has a value in JSON and the value of the required item held internally is not in JSON, an error occurs.
Example:
extern crate oci_spec;
use Spec;
Serialize oci-runtime-spec
Use save of Spec to serialize oci runtime spec config.
If the type is Option and the value is None, it is not serialized.
Example:
extern crate oci_spec;
use Spec;
License
oci-spec is under the MIT or Apache-2.0 license.