     }
 }
 extension JSON : CustomStringConvertible {
-    public var description:String {
+    public func toString(depth d:Int, separator s:String, terminator t:String, sortedKey:Bool=false)->String {
+        let i = Swift.String(repeating:s, count:d)
+        let g = s == "" ? "" : " "
         switch self {
         case .Error(let m):     return ".Error(\"\(m)\")"
         case .Null:             return "null"

        default:
            return AnyIterator { nil }
        }
    }
}
extension JSON : Codable {

}
extension JSON : Sequence {
    public enum IteratorKey {
        case None
        case Index(Int)
        case Key(String)
        public var index:Int?  { switch self { case .Index(let v): return v default: return nil } }
        public var key:String? { switch self { case .Key(let v):   return v default: return nil } }
    }
    public typealias Element = (key:IteratorKey,value:JSON)  // for Sequence conformance
    public typealias Iterator = AnyIterator<Element>
    public func makeIterator() -> AnyIterator<JSON.Element> {
        switch self {
