JW_FLT

Table of Contents

JW_FLT

Description

Append a floating-point value to a JSON string.

Parameters

NameDirectionDescription
jin,outThe target string to append to.
finFloating-point value.

Usage example (from documentation)

  JW_FLT(json, 3.14);

Success

Appends a float value to json

Failure

Does not return on failure

Usage example (Cross-references)

    }                                                                                                              \
    StrAppendf(&(j), "\"%s\":", k);                                                                                \
    JW_FLT(j, f);                                                                                                  \
    } while (0)

Share :

Related Posts

JW_OBJ_KV

JW_OBJ_KV Description Write a key and nested object inside an existing JSON object. Should be called inside JW_OBJ. Adds commas appropriately based on insertion order.

Read More

JR_OBJ_KV

JR_OBJ_KV Description Conditionally parse a JSON object if key matches expected name.

Read More

JW_ARR

JW_ARR Description Write a JSON array from a vector. Each item is rendered using the provided writer. Handles inserting commas between elements.

Read More