             }
         }
         
-        let object = try createObject()
+        let object = try jsonObject()
         let elements = ArraySlice(path.elements)
         return try cast(distilRecursive(object: object, elements: elements))
     }


public final class JSON {
    public let raw: Any
    fileprivate let createObject: () throws -> Any
    
    public subscript(element: PathElement...) -> LazyJSON {
        return .init(rootJSON: self, currentPath: .init(elements: element))

        }
    }
    
    private init(raw: Any, evaluate: @escaping () throws -> Any) {
        self.raw = raw
        self.evaluate = evaluate
    }
    
    fileprivate func jsonObject() throws -> Any {
        if let cached = cached { return cached }
        let jsonObject = try evaluate()
        cached = jsonObject
        return jsonObject
    }
}

