jsonWriteDouble

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

json String
key String
value Double

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.

Example

Example.bam
; No example implemented yet