Example #1
0
 def __json__(self):
     result = collections.OrderedDict(
         __class__=self.__class__.__name__,
     )
     result.update(self._pubdict())
     return asjson(result)
Example #2
0
 def __json__(self):
     result = collections.OrderedDict(__class__=self.__class__.__name__, )
     result.update(self._pubdict())
     return asjson(result)
Example #3
0
 def asjson(self):
     return asjson(self)
Example #4
0
 def __json__(self):
     # preserve order
     return {
         asjson(k): asjson(v)
         for k, v in self.items() if not k.startswith('_')
     }
Example #5
0
 def asjson(self):
     return asjson(self)
Example #6
0
 def __json__(self):
     # preserve order
     return {
         asjson(k): asjson(v)
         for k, v in self.items() if not k.startswith('_')
     }