How do I define the schema in colander for JSON of the following form?
{
'data' : {
'key_1' : [123, 567],
'key_2' : ['abc','def'],
'frank_underwood' : [666.66, 333.333],
... etc ...
}
}
The keys inside 'data' could be any string and values are arrays.
Currently, I have the following but it doesn't really put any constraints on the types of values the mapping can have.
class Query(colander.MappingSchema):
data = colander.SchemaNode(
colander.Mapping(unknown='preserve'),
missing={}
)
What's the proper way of describing this?