text_lint.operations.lookups.encoders.reversed.ReversedEncoder

class text_lint.operations.lookups.encoders.reversed.ReversedEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: JSONEncoder

JSON encoder that reverses dictionaries, lists and tuples.

encode(o: Any) Any[source]

Encode as JSON while reversing dictionaries, lists and tuples.

Parameters:

o (Any) – The object being converted.

Returns:

The converted object.

Return type:

Any