Module json

Source
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§

AllEntitiesNoAttrsSchema
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).
AttributeType
Attribute type structure used in SchemaType
ContextJsonParser
Struct used to parse context from JSON.
EntityJson
Serde JSON format for a single entity
EntityJsonParser
Struct used to parse entities from JSON.
FnAndArg
Structure expected by the __extn escape
JsonRecord
Structure representing a Cedar record in JSON
NoEntitiesSchema
Simple type that implements Schema by expecting no entities to exist at all
NoStaticContext
A DeserializationContext that always returns None. This is the default behaviour,
NullContextSchema
Simple type that implements ContextSchema by expecting an empty context
NullEntityTypeDescription
Simple type that implements EntityTypeDescription by expecting no attributes, tags, or parents to exist
TypeAndId
Structure expected by the __entity escape
ValueParser
Struct used to parse Cedar values from JSON.

Enums§

CedarValueJson
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.
ContextJsonDeserializationError
Errors possible when deserializing request context from JSON
EntityUidJson
Serde JSON format for Cedar values where we know we’re expecting an entity reference
ExtnValueJson
Serde JSON format for Cedar values where we know we’re expecting an extension value
SchemaType
Possible types that schema-based parsing can expect for Cedar values.

Traits§

ContextSchema
Trait for schemas that can inform the parsing of Context data
DeserializationContext
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.
EntityTypeDescription
Trait for a schema’s description of an individual entity type
Schema
Trait for Schemas that can inform the parsing of Entity JSON data