-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Schema choice Done
Replaces top-level when_key_is, when_key_exists, when_tag_is, and choose_schema?
{
"choose_schema": {
"when_key_is": {
"key": "type",
"choices": {
"foo": {...},
"bar": {...},
}
}
}
}choose_schema would continue to allow a python function to be passed? Or maybe {"function": ...}.
Dict(choose_schema=when_key_is("type", {"foo": {...}, "bar": {...}})Internal Schema representation
At the very least, the schema should be parsed into a Python objects with guaranteed fields & whatnot, instead of just dealing with big old bags of k/v. The schema should be parsed validated & transformed with a schema!
Could potentially even compile a schema down to efficient "instructions" to apply to a value.
Python interface
Dict(fields(
a=String(),
b=Integer(),
))or maybe like
Schema(
Dict(),
fields(a=String(), b=Integer()),
registry(coolschema=...),
)
lol?
Metadata
Metadata
Assignees
Labels
No labels