On 12.01.23 18:39, Trevor Orr via Discuss wrote:
The latest dev snap shot support loading json files which is
really cool, is there a way to generate json objects in OpenSCAD?
If you mean generating the same data structure in the script
itself without using import() then the answer is no (for the
normal releases and dev snapshots), and yes via the features
cooking in
https://github.com/openscad/openscad/pull/4478
ciao,
Torsten.
On 1/12/2023 9:57 AM, Torsten Paul wrote:
On 12.01.23 18:39, Trevor Orr via Discuss wrote:
The latest dev snap shot support loading json files which is
really cool, is there a way to generate json objects in OpenSCAD?
If you mean generating the same data structure in the script
itself without using import() then the answer is no (for the
normal releases and dev snapshots), and yes via the features
cooking in
And if you mean generating a JSON file, today you can always use echo(),
but you'd have to either cut-and-paste from the GUI or lightly filter
output from the CLI.
With 4478, echo(obj) may come close to emitting JSON text. There are
two reasons why it wouldn't:
Perhaps 4478 should gain a json() function that converts an OpenSCAD
object into JSON text.
Cool thanks, that will be a great thing to have.
On Thu, Jan 12, 2023 at 9:57 AM Torsten Paul Torsten.Paul@gmx.de wrote:
On 12.01.23 18:39, Trevor Orr via Discuss wrote:
The latest dev snap shot support loading json files which is
really cool, is there a way to generate json objects in OpenSCAD?
If you mean generating the same data structure in the script
itself without using import() then the answer is no (for the
normal releases and dev snapshots), and yes via the features
cooking in
https://github.com/openscad/openscad/pull/4478
ciao,
Torsten.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Hi Trevor,
I am Just curious,
What ist your use Case when you Use openscad to Import and Export json
Files. Can you Detail?
Trevor Orr fractorr@gmail.com schrieb am Do., 12. Jän. 2023, 21:27:
Cool thanks, that will be a great thing to have.
On Thu, Jan 12, 2023 at 9:57 AM Torsten Paul Torsten.Paul@gmx.de wrote:
On 12.01.23 18:39, Trevor Orr via Discuss wrote:
The latest dev snap shot support loading json files which is
really cool, is there a way to generate json objects in OpenSCAD?
If you mean generating the same data structure in the script
itself without using import() then the answer is no (for the
normal releases and dev snapshots), and yes via the features
cooking in
https://github.com/openscad/openscad/pull/4478
ciao,
Torsten.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org