JustasB / BlenderNEURON

Exports 3D structure and activity from NEURON simulator to Blender
http://blenderNEURON.org
MIT License
27 stars 7 forks source link

Create a `JSONEncoder` and `JSONDecoder` #27

Closed Helveg closed 3 years ago

Helveg commented 3 years ago

For ease of use we can have the RPC use a custom encoder and decoder that understands how to transform Cells and Branches into JSON and back. This should also clean up the code avoiding type checking things like coords (as the novice user would be going through the sanitizing RPC, and the advanced "in Blender" use case assumes the Python zen of "responsible adults" that can try to pass whatever they want into our functions and see if it works).

It should also make it easier to keep both sides of the interface in sync as they'd be using the same classes, transparently sending them across to the other environment.