[#BloombergLP-baljsn-JsonFormatter_Util-setFloatingPointToJson] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/JsonFormatter_Util.adoc[JsonFormatter_Util]::setFloatingPointToJson :relfileprefix: ../../../ :mrdocs: Load the JSON representation of a floating‐point `value` into `json`. == Synopsis Declared in `<baljsn_jsonformatter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> static int setFloatingPointToJson( xref:BloombergLP/bdljsn/Json.adoc[bdljsn::Json]* json, TYPE const& value, xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const* options); ---- == Description Optionally use the specified `options` (notably `encodeInfAndNaNAsStrings`). Return 0 on success and a non‐zero value otherwise. == Return Value 0 on success and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *json* | JSON object to receive the encoded value | *value* | floating‐point value to encode | *options* | optional encoding options; null uses defaults |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#