             message: String(cString: sajson_get_error_message(dptr)))
     }
 
-    return Document(doc: dptr)
+    return Document(doc: dptr, input: copy)
 }
 
 public func parse(allocationStrategy: AllocationStrategy, input: String) throws -> Document {

}

public final class Document {
    internal init(doc: OpaquePointer!) {
        self.doc = doc

        let rootType = sajson_get_root_type(doc)
        let rootValuePaylod = sajson_get_root(doc)!


    private let rootNode: ASTNode
    private let doc: OpaquePointer!
    private let input: Data // We need to hold onto the memory from the buffer we parsed
}

public final class ParseError: Error {
