Question on option JSON_REAL_PRECISION

21 views
Skip to first unread message

Walter Both

unread,
Sep 8, 2020, 4:10:00 AM9/8/20
to Jansson users
I have a question on the number of decimals in reals in jansson. I know the option you can use in json_dumps(), JSON_REAL_PRECISION. But that is a global one. I would like to be able to control the number of decimals on a per field base. This is because we have data we would like to send in different formats. E.g. prices without decimals, or 2 or 3 etc. Would it be possible to add such functionality or would it conflict with the design of the jansson library?
Reply all
Reply to author
Forward
0 new messages