Expand description
Validators for JSON and CBOR data structures
Modules§
Structs§
- Entry
Count - Entry count
Enums§
Traits§
- Validator
- Validator trait. Implemented for JSON documents and CBOR binaries
Functions§
- entry_
counts_ from_ group - Retrieve number of group entries from a group. This is currently only used for determining map equality/inequality and for validating the number of entries in arrays, but may be useful in other contexts. The occurrence is only captured for the second element of the CDDL array to avoid ambiguity in non-homogenous array definitions
- format_
regex - Regex needs to be formatted in a certain way so it can be parsed. See https://github.com/anweiss/cddl/issues/67
- generic_
params_ from_ rule - Retrieve the list of generic parameters for a given rule
- group_
choice_ alternates_ from_ ident - Find all group choice alternate rules from a given identifier
- group_
rule_ from_ ident - Find non-group choice alternate rule from a given identifier
- ident_
matches_ bool_ value - Does the given boolean identifier match the boolean value
- is_
ident_ any_ type - Is the given identifier associated with the any type
- is_
ident_ b64url_ data_ type - Is the given identifier associated with a b64url data type
- is_
ident_ bool_ data_ type - Is the given identifier associated with a boolean data type
- is_
ident_ byte_ string_ data_ type - Is the given identifier associated with a byte string data type
- is_
ident_ float_ data_ type - Is the given identifier associated with a float data type
- is_
ident_ integer_ data_ type - Is the given identifier associated with an integer data type
- is_
ident_ nint_ data_ type - Is the given identifier associated with a nint data type
- is_
ident_ null_ data_ type - Is the given identifier associated with a null data type
- is_
ident_ numeric_ data_ type - Is the given identifier associated with a numeric data type
- is_
ident_ string_ data_ type - Is the given identifier associated with a string data type
- is_
ident_ tdate_ data_ type - Is the given identifier associated with a tdate data type
- is_
ident_ time_ data_ type - Is the given identifier associated with a time data type
- is_
ident_ uint_ data_ type - Is the given identifier associated with a uint data type
- is_
ident_ uri_ data_ type - Is the given identifier associated with a URI data type
- rule_
from_ ident - Find non-choice alternate rule from a given identifier
- text_
value_ from_ ident - Find text values from a given identifier
- text_
value_ from_ type2 - Find text values from a given Type2
- type_
choice_ alternates_ from_ ident - Find all type choice alternate rules from a given identifier
- type_
choices_ from_ group_ choice - Convert a given group choice to a list of type choices
- type_
rule_ from_ ident - Find non-group choice alternate rule from a given identifier
- unwrap_
rule_ from_ ident - Unwrap array, map or tag type rule from ident
- validate_
array_ occurrence - Validate array length and [non]homogeneity based on a given optional occurrence indicator. The first bool in the returned tuple indicates whether or not a subsequent validation of the array’s elements shouch be homogenous. The second bool in the returned tuple indicates whether or not an empty array is allowed during a subsequent validation of the array’s elements.
- validate_
cbor_ from_ slice - Validate CBOR slice from a given CDDL document string
- validate_
entry_ count - Validate the number of entries given an array of possible valid entry counts
- validate_
json_ from_ str - Validate JSON string from a given CDDL document string