Treatment tryFromOptionNumberF64

json/value::tryFromOptionNumberF64


Generics

◻ F: ToF64

Inputs

⇥ value: Stream<Option<F>>

Outputs

↦ json: Stream<Option<Json>> (json::Json)


Convert each optional f64-convertible value in the stream into a JSON number, null for none elements, or none for infinite/NaN values.

⚠️ Infinite and NaN values are not valid JSON and produce none on json, not a JSON null.

graph LR
     T("tryFromOptionNumberF64()")
     A["〈🟦〉 … 〈none〉"] -->|value| T
     T -->|json| B["〈🟦〉 … 〈null〉 … 〈none〉"]

     style A fill:#ffff,stroke:#ffff
     style B fill:#ffff,stroke:#ffff