swansonk14 / typed-argument-parser

Typed argument parser for Python
MIT License
494 stars 40 forks source link

Human readable JSON for saved Python object #126

Closed martinjm97 closed 8 months ago

martinjm97 commented 8 months ago

Tap provides args.save("path.json"), which saves args: Tap to a file path.json. To save an argument of a non-primitive type, Tap pickles that argument. This results in a saved path.json file that has an "_value" key whose value is not readable. It would be nice to add an "_string" key with a value that is the result of running str on that argument.

--JK

martinjm97 commented 8 months ago

Resolved in https://github.com/swansonk14/typed-argument-parser/commit/1ca3652e998676630656042dce71a5651fca1e26

--JK