JSON with Shapediver - Number rounding

Hello !

I’m working on a project with JSON data structure. This project include carbon footprint and thermal transmittance calculation. I’ve noticed that the “JSON construct” component does not behave consistently when rounding numbers. In the example attached, the panel’s width should be 0.9 and 0.45.

Any idea what’s going on ? I know this won’t affect much my script for now.

Regards,
Florian.

This is likely not an issue with the Construct JSON component but with the precision you are using in your document. Grasshopper displays rounded versions of the numbers that are manipulated but as soon as you store them in a JSON object the actual precision is used. You could either manually round all numbers before using them to construct the JSON (using the Round component) or change the precision used in the document.