Expand description
PostgreSQL text and JSON forms of a float, including the non-finite values JSON numbers cannot hold.
PostgreSQL renders a non-finite float as NaN, Infinity or
-Infinity, and to_json renders it as that text in a JSON string.
A JSON number cannot hold these values, and serde_json turns them into
null. Every path that renders a float to text or JSON calls these
functions instead.
Functionsยง
- float_
to_ json - A float as a JSON value. A finite float is a JSON number. A non-finite
float is its PostgreSQL text in a JSON string, as
to_jsonrenders it. - non_
finite_ float_ text - The PostgreSQL text of a non-finite float:
NaN,Infinityor-Infinity.Nonefor a finite float.