Example #1
0
def json_encoder(obj):
    iface = getattr(obj, '__schema__', None)
    if iface is None:
        return obj
    return to_dict(obj)
Example #2
0
 def __call__(self):
     result = to_dict(self.context)
     return result
Example #3
0
 def __call__(self):
     result = to_dict(self.context)
     for listing in result.get('listings', []):
         result[listing.type_] = listing.items
     return result
Example #4
0
 def __call__(self):
     return to_dict(self.context)