Skip to content

Json

timenet.json source

Strict validation for metadata documented as JSON-compatible.

JsonMapping module-attribute source

JsonMapping = TypeAliasType(
    "JsonMapping", dict[StrictStr, JsonValue]
)

A strict JSON object with string keys.

validate_json_mapping source

validate_json_mapping(value: object) -> JsonMapping

Validate and copy a string-keyed JSON object.

Parameters:

Name Type Description Default
value object

Candidate metadata mapping.

required

Returns:

Type Description
JsonMapping

A detached JSON-native dictionary.

validate_json_value source

validate_json_value(value: object) -> JsonValue

Validate and copy one strict JSON value.

Parameters:

Name Type Description Default
value object

Candidate JSON value.

required

Returns:

Type Description
JsonValue

A detached hierarchy containing only JSON-native values.