bluesky_tiled_plugins.utils#
Module Contents#
Functions#
Truncate large numerical values to avoid overflow issues when serializing as JSON. |
API#
- bluesky_tiled_plugins.utils.truncate_json_overflow(data)#
Truncate large numerical values to avoid overflow issues when serializing as JSON.
This preemptively truncates large integers and floats with zero fractional part to fit within the JSON limits for integers, i.e. (-2^53, 2^53 - 1], in case the values are implicitly converted during serialization.