Exemplo n.º 1
0
    def get(self, key, default=None):
        value = super(JsonDict, self).get(key, default)

        # Only deserialize if value was pulled from dict
        if value and value != default:
            value = deserializeValue(value)
        return value
    def get(self, key, default=None):
        value = super(JsonDict, self).get(key, default)

        # Only deserialize if value was pulled from dict
        if value and value != default:
            value = deserializeValue(value)
        return value
Exemplo n.º 3
0
 def deserializeValue(value):
     """ Convenience method to provide interface to deserializeValue tooling """
     return deserializeValue(value)
Exemplo n.º 4
0
 def itervalues(self):
     for v in super(JsonDict, self).itervalues():
         yield deserializeValue(v)
Exemplo n.º 5
0
 def iteritems(self):
     for (k, v) in super(JsonDict, self).iteritems():
         yield (k, deserializeValue(v))
Exemplo n.º 6
0
 def items(self):
     return [(k, deserializeValue(v))
             for k, v in super(JsonDict, self).items()]
Exemplo n.º 7
0
 def __getattr__(self, key):
     # Deserialize on 'get'
     return deserializeValue(super(JsonDict, self).__getattr__(key))
 def deserializeValue(value):
     """ Convenience method to provide interface to deserializeValue tooling """
     return deserializeValue(value)
 def itervalues(self):
     for v in super(JsonDict, self).itervalues():
         yield deserializeValue(v)
 def iteritems(self):
     for (k, v) in super(JsonDict, self).iteritems():
         yield (k, deserializeValue(v))
 def items(self):
     return [(k, deserializeValue(v)) for k, v in super(JsonDict, self).items()]
 def __getattr__(self, key):
     # Deserialize on 'get'
     return deserializeValue(super(JsonDict, self).__getattr__(key))