+ PropertyProxy::PropertyProxy(json_t* object, const char* key)
+ : _object(object), _key(0) {
+ _iter = json_object_iter_at(object, key);
+ if(!_iter)
+ _key = strdup(key);
+ json_incref(_object);
+ }
+
+ PropertyProxy::PropertyProxy(const PropertyProxy& other)
+ : _object(other._object), _iter(other._iter), _key(0) {
+ if(other._key)
+ _key = strdup(other._key);
+ json_incref(_object);
+ }
+
+ PropertyProxy::~PropertyProxy() {
+ free(_key);
+ json_decref(_object);
+ }
+