Symmetrical Json Deserializers

  • Re: V2 Deserializers (Import)

    I was wondering if the V2 serializer/deserializers for JSON are now symmetrical? And if so is there a way to install V2 on npm yet?

    Outside of switching to V2, is there any way to go from the Json serialized-CSG back to a CSG object? the Json deserializer on io seems to just be returning jscad code.

    Any help welcome ! Thanks!

  • Awesome! Thank you!

  • @Maria-Alzate welcome

    Yes. All serializers/deserializers should be symmetrical. JSON should always be so.

    Each of the V2 deserializers has an option called 'output'. You can specify 'script' to get a JSCAD script, or 'geometry' to get an array of V2 data structures.

    Also, the CLI can convert between formats using the -of <output format> option.

    V2 has not been published to NPM as of today. If interested in V2 then please see the early adoption notes.

    P.S. There's a bug in the WEB UI that prevents drag and drop of JSON files. A fix is in progress.

Log in to reply