Add a json serilizer for ProcSet (to allow monkey patching)
Merge request reports
Activity
This feature looks out of the scope of the library. IMHO, the code snippet you provide here should reside in whatever code that requires to export to JSON. However, I do agree that it may be of use for users of the library. What do you think of adding this snippet into a 'tips & tricks' section of the upcoming documentation?
I would rather suggest to use
str
instead ofrepr
when dumping a ProcSet into a JSON: it provides the same information, and is not tied to this library (i.e., you could parse the JSON with another tool or language).Honestly, I do not remember why I needed this feature, and I do not need this anymore.
Still it can be useful for anyone that wants to directly serialize a an object that contains a ProcSet, and put this on the tips and tricks section seems right.
Isn't
repr
exactly made for this? a string representation that can be used to recreate the object easily? Anyway, do what seem the most relevant to you.