     }
 }
 
-private struct StringBuilder {
-    
-    var buf: [UInt8]
-    
-    init() {
-        self.buf = [UInt8]()
-    }
+private extension String {
     
     mutating func append(x: UInt8) {
-        buf.append(x)
+        self.append(UnicodeScalar(x))
     }
     
     mutating func append(escape x: UInt8) -> Bool {
         switch x {
         case 34, 39, 47, 92:
-            buf.append(x)
+            self.append(x)
         case 116:
-            buf.append(9)
+            self.append(9)
         case 114:
-            buf.append(13)
+            self.append(13)
         case 110:
-            buf.append(10)
+            self.append(10)
         default:
             return false
         }
         return true
     }
-    
-    mutating func clear() {
-        buf.removeAll(keepCapacity: true)
-    }
-    
-    mutating func getString() -> String? {
-        buf.append(0)
-        return String.fromCString(UnsafePointer(buf))
-    }
 }
 
 private struct JsonParser {
     
-    var strbuf: StringBuilder
+    var strbuf: String
     var scanner: CharacterScanner
     
     init(bytes: UnsafePointer<UInt8>, count: Int) {
-        self.strbuf = StringBuilder()
+        self.strbuf = String()
         self.scanner = CharacterScanner(bytes: bytes, count: count)
         self.scanner.next()
     }

    }
    
    mutating func parseNumber() throws -> Json {
        strbuf.clear()
        var isFloat = false
        Loop: while currentChar != nil {
            switch currentChar! {
            case 43, 45, 48...57:
                strbuf.append(currentChar!)
                scanner.next()
            case 46, 69, 101:
                strbuf.append(currentChar!)
                scanner.next()
                isFloat = true
            default: break Loop
            }
        }
        strbuf.append(0)
        if isFloat {
            var error: UnsafeMutablePointer<Int8> = nil
            let val = strtod(UnsafePointer(strbuf.buf), &error)
            if error.memory == 0 {
                return Json(val)
            }
        } else {
            var error: UnsafeMutablePointer<Int8> = nil
            let val = strtol(UnsafePointer(strbuf.buf), &error, 10)
            if error.memory == 0 {
                return Json(val)
            }
        }
        throw JsonParseError.UnexpectedToken(position: scanner.pos)
    }
    
    mutating func parseString() throws -> Json {
        if scanner.next() == nil {
            throw JsonParseError.UnexpectedEndOfToken
        }
        strbuf.clear()
        Loop: while currentChar != nil {
            switch currentChar! {
            case 92:

    }
    
    mutating func skipWhitespaces() throws {
        Loop: while currentChar != nil {
            switch currentChar! {
            case 9, 10, 13, 32: scanner.next()
            default: break Loop
            }
        }
        if currentChar == nil {
            throw JsonParseError.UnexpectedEndOfToken
