Closed
Description
It would be useful if jsonschema
could provide support for retrieving a processed copy of the validated document, with automatic conversion of formatted strings into python data types.
This would have to be a configuration option on the validator/formatter, since not all format strings have an obvious native python data type (e.g. datetimes have an obvious native type, but "ipv4" may not).
So for example, with an appropriately configured validator, you could do something like:
doc = {"created_at": "2020-02-01 00:00:00"}
validator.validated(doc)
# --> {"created_at": datetime.datetime(2020, 2, 1, 0, 0)}
Metadata
Metadata
Assignees
Labels
No labels