Skip to content

limiting print decimal point #175

@ajaybhargav

Description

@ajaybhargav

Currently JSON number is printed with upto 15 decimal places (e.g. 21.379983333333332) most of the time such long number is not needed and is a wastage of space in embedded system. Can we have a provision where in we can pass number of decimal places needed.

for instance:
cJSON_CreateNumber(double num, int digits)

This will save lot of space when complete decimal number is not needed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions