comicbox.schemas.json_schemas

source module comicbox.schemas.json_schemas

Json Schema.

Classes

Functions

source datetime_handler(value)

Convert datetimes to strings for json.dumps.

source class JsonRenderModule()

Bases : BaseRenderModule

JSON Render module with custom formatting and Decimal support.

Methods

  • dumps Dump dict to JSON string with formatting.

  • loads Load JSON string to dict.

source classmethod JsonRenderModule.dumps(obj: Mapping, *args: Any, compact: bool = False, sort_keys: bool = False, **kwargs: Any)str

Dump dict to JSON string with formatting.

source classmethod JsonRenderModule.loads(s: str | bytes | bytearray, *args: Any, **kwargs: Any)Any

Load JSON string to dict.

source class JsonSubSchema()

Bases : BaseSubSchema, ABC

Json Sub Schema.

source class JsonSchema()

Bases : BaseSchema, ABC

Json Schema.

source class JsonSchema.Meta()

Bases : BaseSchema.Meta

Schema Options.