Treatment fromOptionNumberF64

json/value::fromOptionNumberF64


Generics

◻ F: ToF64

Parameters

↳ var replacement: Json (json::Json)

Inputs

⇥ value: Stream<Option<F>>

Outputs

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


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

⚠️ Infinite and NaN values are not valid JSON; replacement must itself be a valid JSON value.

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

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