Replies: 4 comments 3 replies
-
I believe you will need to write code to convert the dxf. |
Beta Was this translation helpful? Give feedback.
-
It's not just needing everything in JSON format, but how the data is organized is up to the person writing it. It's probably best to collaborate with someone who knows JSON and DXF well. I will ask around, but I will not have any sort of guidance from them from them for a week or so. |
Beta Was this translation helpful? Give feedback.
-
I guess what you are trying is failing because of the circular references within the DxfDocument, without customizing the serialization process it will not work. What I do not understand is why do you need to do this, the whole point of the serialization process is to save the state of an object to a more persistent medium, talking plainly saving and loading to disk. Why don't you just save your DxfDocument to a DXF? |
Beta Was this translation helpful? Give feedback.
-
Having everything in JSON and properly structured where it can be read, undestood, modified and enhanced by any end user will likely provide the best interoperability and achive the greatest innovation accross the board. I am just waiting to get given the JSON structure that someone else is coding and setting up and then I will probably attempt it myself at that point. There are some real particulars about getting information for manufacturing without the necessity of parametrics, while still having parametrics work and work well, simultaneously. A really good way to do that can be accomplished with JSON and defining objects in such a way that orientation information is integral without the complexities of having to transform objects later to get the correct bounding box and the returned values associations to length, width and thickness. If it is done clean, anyone can edit a drawing with just notepad. |
Beta Was this translation helpful? Give feedback.
-
Hi folks,
I'm currently using netDxf C# library on a Web API, and I'd like to return the DxfDocument serialized but I can't find any way to serialize it. I've tried NewtonSoft.Json but it either gets an "self referencing" error and even when trying to ignore or handle it it seems to go into infinite loop and makes API crash.
Tried System.Text.Json too but also gets error or incomplete serializing...
Has anyone encountered such a problem or found any solution to it ?
Thanks in advance
Rémy
Beta Was this translation helpful? Give feedback.
All reactions