Save Geometry in Json

Hello i have to convert a rhino Geometry and store it as a JsonFile.
I am stuck on a Brep simply because have too many information to store.
Is it possibile to store directly the data (even as ascii) directly in the json file?

Rhino 7 has a ToJson function for all geometry classes

We don’t store the data in a human readable format if that is what you are looking for. The json data is a base64 encoded string of the byte array representing the geometry.

All of the GeometryBase derived classes in RhinoCommon also implement ISerializable so you could use the Json.NET library for encode these classes to json as well.

Great! thank you very much