JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Symmetrical Json Deserializers

    Scheduled Pinned Locked Moved Development Discussions
    3 Posts 2 Posters 828 Views 1 Watching
    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 AlzateM Offline
      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!

      z3devZ 1 Reply Last reply Reply Quote 0
      • z3devZ Offline
        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
        • Maria AlzateM Offline
          Maria Alzate
          last edited by

          Awesome! Thank you!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Powered by NodeBB | Contributors