Esempio n. 1
0
 def name(self):
     return class_name(cls=self.cls)
Esempio n. 2
0
def serialize(schema):
    """ Serialize colander ``schema``"""
    r = {"type": class_name(schema.typ), "name": schema.name}
    if schema.children:
        r["fields"] = [serialize(n) for n in schema.children]
    return r