Skip to main content

key_must_be_a_string

No overview available.

def key_must_be_a_string(
key: Any
) - > null

Validates that a dictionary key is of type string to ensure compatibility with JSON serialization or specific storage backends.

Parameters

NameTypeDescription
keyAnyThe dictionary key to be validated for string type compliance.

Returns

TypeDescription
nullNothing is returned if the validation passes.