Adds a double-precision floating-point key-value pair to a JSON object.
Takes json string, key string, and double value.
Returns modified json via ReturnString.
JSON
Parameters & Returns
Parameters
jsonString
keyString
valueDouble
Returns
String
Quick Summary
Adds a double-precision floating-point key-value pair to a JSON object.
Takes json string, key string, and double value.
Returns modified json via ReturnString.
Technical Exegesis...
Adds a double-precision floating-point key-value pair to a JSON object. Takes json string, key string, and double value. Calls NeedsComma to check if comma needed. If comma needed, appends ",". Appends "\"key\":value" format. Converts value to string with std::ostringstream to avoid scientific notation for small numbers. Returns modified json via ReturnString.
This function adds floating-point field to JSON object. NeedsComma helper prevents syntax errors. Format is JSON standard: "key":3.14159.
Adds a double-precision floating-point key-value pair to a JSON object. Takes json string, key string, and double value. Calls NeedsComma to check if comma needed. If comma needed, appends ",". Appends "\"key\":value" format. Converts value to string with std::ostringstream to avoid scientific notation for small numbers. Returns modified json via ReturnString.
This function adds floating-point field to JSON object. NeedsComma helper prevents syntax errors. Format is JSON standard: "key":3.14159. No quotes around number value. ostringstream formatting preserves precision and avoids scientific notation (1e-5) for readability. Use for decimal properties in JSON documents. Common pattern: json = jsonWriteDouble(json, "pi", 3.14159), json = jsonWriteDouble(json, "gravity", 9.8). Handles very large and very small numbers. Precision depends on double type (typically 15-17 decimal digits).