         }
     }
 
-    private mutating func decodeNull() -> Result {
+    private mutating func decodeNull() -> Result<JSON, NSError> {
         if loc + 4 > input.count {
             return makeParseError("invalid token at position \(loc) - expected `null`")
         }

            }

            switch parseValue() {
            case .Ok(let json):
                items.append(json)

            case let error:

import Result

// TODO: use error types
private func makeParseError(reason: String) -> Result<JSON, NSError> {
    return .Failure(JSON.makeError(.CouldNotParseJSON, problem: reason))
}
