JsonSchemaExt

Trait JsonSchemaExt 

Source
pub trait JsonSchemaExt {
    // Required methods
    fn is_type_of_object(&self) -> bool;
    fn is_type_of_array(&self) -> bool;
    fn is_type_of_byte_array(&self) -> bool;
    fn is_type_of_string(&self) -> bool;
    fn get_schema_properties(&self) -> Result<&JsonValue, Error>;
    fn get_schema_required_fields(&self) -> Result<Vec<&str>, Error>;
    fn is_type_of_identifier(&self) -> bool;
}

Required Methods§

Source

fn is_type_of_object(&self) -> bool

returns true if json value contains property ’type`, and it equals ‘object’

Source

fn is_type_of_array(&self) -> bool

returns true if json value contains property ’type`, and it equals ‘array’

Source

fn is_type_of_byte_array(&self) -> bool

returns true if json value contains property byteArray and it equals true

Source

fn is_type_of_string(&self) -> bool

returns true if json value contains property ’type`, and it equals ‘string’

Source

fn get_schema_properties(&self) -> Result<&JsonValue, Error>

returns the properties of Json Schema object

Source

fn get_schema_required_fields(&self) -> Result<Vec<&str>, Error>

returns the required fields of Json Schema object

Source

fn is_type_of_identifier(&self) -> bool

returns the indexes from Json Schema returns the indexes from Json Schema returns true if json value contains property contentMediaType and it equals to Identifier

Implementors§