Lotus.Value (Lotus v0.16.4)

Copy Markdown View Source

Central value normalization for JSON/CSV/UI display.

This module provides a unified interface for normalizing database values for different output formats. The underlying normalization logic is provided by the Lotus.Normalizer protocol.

Summary

Functions

Normalizes a value for JSON export, preserving appropriate types.

Normalizes a value for CSV export, converting to a string representation.

Normalizes a value for UI display, converting to a readable string representation.

Functions

for_json(value)

@spec for_json(term()) :: term()

Normalizes a value for JSON export, preserving appropriate types.

to_csv_string(value)

@spec to_csv_string(term()) :: String.t()

Normalizes a value for CSV export, converting to a string representation.

to_display_string(value)

@spec to_display_string(term()) :: String.t()

Normalizes a value for UI display, converting to a readable string representation.