                 let resError = ParseJsonDataError(data: data, jsonError: error, context: context ?? "")
                 return .Failure(resError)
             } catch {
-                return .Failure(Error(description: "unexpected system state 2"))
+                return .Failure(JsonParserError(description: "JsonTools.jsonLoader: unexpected system state"))
             }
         }
     }


    public static func jsonLoader(data: NSData, context: CustomStringConvertible? = nil) -> AsyncStream<AnyObject, AnyObject, NSError> {

        return asyncStreamWithJob { (progress: AnyObject -> Void) -> Result<AnyObject, NSError> in

            do {
                let jsonObj = try NSJSONSerialization.JSONObjectWithData(data, options: [.AllowFragments])


import ReactiveKit

public class JsonParserError : Error {}

public extension AsyncStreamType where Self.Value == NSData, Self.Error == NSError {

    func toJson() -> AsyncStream<AnyObject, AnyObject, NSError> {
