websauna.utils.jsonb module

JSONB data utilities.


Dump JSON so that we handle decimal and dates.

Decimals are converted to strings.

websauna.utils.jsonb.is_index_property(obj, name)[source]

Check if an object property is index_property like.

This is needed to correctly generate Colander schema for index_property in SQLAlchemy models.

Return type:bool

Get a JSON round trip for data.

This ensures we see data as it would be after JSON encode.

Return type:dict