Mentions légales du service

Skip to content
Snippets Groups Projects

Add a json serilizer for ProcSet (to allow monkey patching)

Closed MERCIER Michael requested to merge json-serializer into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Any news about this?

  • 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 of repr 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.

  • Closing the issue, the code snippet has been included in the official documentation.

Please register or sign in to reply
Loading