JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Symmetrical Json Deserializers

    Development Discussions
    2
    3
    398
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Maria Alzate
      Maria Alzate last edited by

      Re: V2 Deserializers (Import)

      Hello,
      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!

      z3dev 1 Reply Last reply Reply Quote 0
      • Maria Alzate
        Maria Alzate last edited by

        Awesome! Thank you!

        1 Reply Last reply Reply Quote 0
        • z3dev
          z3dev @Maria Alzate last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB | Contributors