Expand description
This module contains functionality for serializing and deserializing Cedar values, entities, Contexts, etc to and from JSON.
Modules§
- err
- Error types for JSON serialization and deserialization
Structs§
- AllEntities
NoAttrs Schema - Simple type that implements
Schema
by allowing entities of all types to exist, and allowing all actions to exist, but expecting no attributes or parents on any entity (action or otherwise). - Attribute
Type - Attribute type structure used in
SchemaType
- Context
Json Parser - Struct used to parse context from JSON.
- Entity
Json - Serde JSON format for a single entity
- Entity
Json Parser - Struct used to parse entities from JSON.
- FnAnd
Arg - Structure expected by the
__extn
escape - Json
Record - Structure representing a Cedar record in JSON
- NoEntities
Schema - Simple type that implements
Schema
by expecting no entities to exist at all - NoStatic
Context - A
DeserializationContext
that always returnsNone
. This is the default behaviour, - Null
Context Schema - Simple type that implements
ContextSchema
by expecting an empty context - Null
Entity Type Description - Simple type that implements
EntityTypeDescription
by expecting no attributes, tags, or parents to exist - Type
AndId - Structure expected by the
__entity
escape - Value
Parser - Struct used to parse Cedar values from JSON.
Enums§
- Cedar
Value Json - The canonical JSON representation of a Cedar value.
Many Cedar values have a natural one-to-one mapping to and from JSON values.
Cedar values of some types, like entity references or extension values,
cannot easily be represented in JSON and thus are represented using the
__entity
, or__extn
escapes. - Context
Json Deserialization Error - Errors possible when deserializing request context from JSON
- Entity
UidJson - Serde JSON format for Cedar values where we know we’re expecting an entity reference
- Extn
Value Json - Serde JSON format for Cedar values where we know we’re expecting an extension value
- Schema
Type - Possible types that schema-based parsing can expect for Cedar values.
Traits§
- Context
Schema - Trait for schemas that can inform the parsing of Context data
- Deserialization
Context - A (optional) static context for deserialization of entity uids
This is useful when, for plumbing reasons, we can’t get the appopriate values into the dynamic
context. Primary use case is in the
DeserializeAs
trait. - Entity
Type Description - Trait for a schema’s description of an individual entity type
- Schema
- Trait for
Schema
s that can inform the parsing of Entity JSON data