set_real_precision()

set_real_precision()#

Sets the precision for real number formatting in JSON encoding and returns the previous precision value.

Prototype

int set_real_precision(int precision);

Parameters

Key

Type

Description

precision

int

The new precision value for real number formatting.


Return Value

Returns the previous precision value before the update.

Notes

This function affects the precision of floating-point numbers when converting JSON objects to strings.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples