     }
     
     /**
-    * Box wrapper for object value
-    */
+     * Box wrapper for object value
+     */
     public class _DictBox {
         var dict: [Swift.String : JSON]
         init(_ d: [Swift.String : JSON]) {

        var index : Int = 0
        init(json: JSON) {
            switch json {
                case .Object(let obj): objectGenerator = obj.dict.generate()
                case .Array(let arr): arrayGenerator = arr.array.generate()
                default: break
            }
        }
        

        if cursor != string.endIndex {
            let char = string[cursor]
            switch char {
            case co: token = .CurlyOpen
            case cc: token = .CurlyClose
            case so: token = .SquareOpen
            case sc: token = .SquareClose
            case comma: token = .Comma
            case colon: token = .Colon
            case q: token = .String
            case _f: token = .False
            case _t: token = .True
            case _n: token = .Null
            case minus, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9: token = .Number
            default: break
            }
        }
        
        cursor = eatWhiteSpace(cursor)
        return (token, cursor)
    }
    
    private func getLastIndexOfNumber(index: Int) -> Int {
        for lastIndex in Range(start: index, end: string.endIndex) {
            switch (string[lastIndex]) {
                // -4.2e3  +12E4
            case minus, plus, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _e, _E, dot: continue
            default: return lastIndex
            }
        }
        return string.endIndex
    }
    
    private func parseValue(index: Int) throws -> (JSON, Int) {
        let (token, cursor) = nextToken(index)
        
        switch token {
        case .CurlyOpen : return try parseObject(cursor)
        case .SquareOpen : return try parseArray(cursor)
        case .Number : return try parseNumber(cursor)
        case .String : return try parseString(cursor)
        case .False: return try parseFalse(cursor)
        case .True: return try parseTrue(cursor)
        case .Null: return try parseNull(cursor)
        default: break
        }
        throw ParseError("invalid json: character invalid at \(cursor)")
    }
    
    private func parseString(index: Int) throws -> (JSON, Int) {
        let (s, cursor, err) = _parseString(index)
        if  let json = s {
            return (JSON(json), cursor)
        }
        throw ParseError(err!)
    }
    
    private func parseNumber(index: Int) throws -> (JSON, Int) {
        let cursor = eatWhiteSpace(index)
        let lastIndex = getLastIndexOfNumber(cursor)
        var substr = ""
