[x3d-public] JSON Serialization to Bindings what can precision can we get?
John Carlson
yottzumm at gmail.com
Mon Dec 5 20:27:37 PST 2022
AFAIK, these are the suffixes we can add to double and float numbers.
Please feel free to correct, and I will update code.
Since JSON is not a binding, I have chosen not to include it. Indeed, there
is no available suffix in JSON (yet) for floats and doubles.
Joe, I suggest you find a formatter for the source language in question,
like printf in C.
If we can collect ways to format in various languages, we'll need some
standard ways of using the formatter in the "exporter."
I've done my show for today. except for looking up formatters for
JavaScript.
$ grep const.*SUFFIX *.js
CppSerializer.js:const DOUBLE_SUFFIX = '';
CppSerializer.js:const FLOAT_SUFFIX = '';
CSerializer.js:const DOUBLE_SUFFIX = '';
CSerializer.js:const FLOAT_SUFFIX = '';
JavaSerializer.js:const DOUBLE_SUFFIX = 'd';
JavaSerializer.js:const FLOAT_SUFFIX = 'f';
PythonSerializer.js:const DOUBLE_SUFFIX = '';
PythonSerializer.js:const FLOAT_SUFFIX = '';
VRMLScriptSerializer.js:const DOUBLE_SUFFIX = '';
VRMLScriptSerializer.js:const FLOAT_SUFFIX = '';
$ grep "var .*"SUFFIX *.js
DartSerializer.js:var DOUBLE_SUFFIX = '';
DartSerializer.js:var FLOAT_SUFFIX = '';
ECMAScriptSerializer.js:var DOUBLE_SUFFIX = '';
ECMAScriptSerializer.js:var FLOAT_SUFFIX = '';
JavaScriptSerializer.js:var DOUBLE_SUFFIX = '';
JavaScriptSerializer.js:var FLOAT_SUFFIX = '';
NodeSerializer.js:var DOUBLE_SUFFIX = '';
NodeSerializer.js:var FLOAT_SUFFIX = '';
X_ITESerializer.js:var DOUBLE_SUFFIX = '';
X_ITESerializer.js:var FLOAT_SUFFIX = '';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20221205/b2833dd9/attachment.html>
More information about the x3d-public
mailing list