Symmetrical Json Deserializers
-
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!
-
@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.
-
Awesome! Thank you!
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