     }
     
     /**
-    * Empty json or invalid json with parse error message
-    */
-    case None(_: Swift.String?)
-    
-    /**
-    * JSON null value
-    */
+     * JSON null value
+     */
     case Null
     
     /**
-    * JSON bool value(true, false)
-    */
+     * JSON bool value(true, false)
+     */
     case Boolean(_: Bool)
     
     /**
-    * JSON number value
-    */
+     * JSON number value
+     */
     case Number(_: Double)
     
     /**
-    * JSON string value
-    */
+     * JSON string value
+     */
     case String(_: Swift.String)
     
     /**
-    * JSON array value
-    */
+     * JSON array value
+     */
     case Array(_: _ArrayBox)
     
     /**
-    * JSON object value 
-    */
+     * JSON object value
+     */
     case Object(_: _DictBox)
-    
-    init() {
-        self = .None(nil)
-    }
 }
 
 //MARK: - Literal convert
-extension JSON : NilLiteralConvertible { 
+extension JSON : NilLiteralConvertible {
     public init(nilLiteral: ()) {
-      self = .Null
-    }
-    
-    /**
-    * Check if this JSON is Null value
-    */
+        self = .Null
+    }
+    
+    /**
+     * Check if this JSON is Null value
+     */
     public var isNull : Bool {
         switch self {
-            case .Null: return true
-            default: return false
+        case .Null: return true
+        default: return false
         }
     }
 }

        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) -> (JSON, Int) {
        let (token, cursor) = nextToken(index)

        switch token {
            case .CurlyOpen : return parseObject(cursor)
            case .SquareOpen : return parseArray(cursor)
            case .Number : return parseNumber(cursor)
            case .String : return parseString(cursor)
            case .False: return parseFalse(cursor)
            case .True: return parseTrue(cursor)
            case .Null: return parseNull(cursor)
            default: break
        }
        return (.None("invalid json: character invalid at \(cursor)"), cursor)
    }

    private func parseString(index: Int) -> (JSON, Int) {
        let (s, cursor, err) = _parseString(index)
        if  let json = s {
            return (JSON(json), cursor)
        }
        return (.None(err), cursor)
    }

    private func parseNumber(index: Int) -> (JSON, Int) {
        let cursor = eatWhiteSpace(index)
        let lastIndex = getLastIndexOfNumber(cursor)
        var substr = ""

            let (token, nextNext) = nextToken(cursor)
            switch token {
                // "," parse next value
            case .Comma: cursor = nextNext.successor()
                // "]" end array
            case .SquareClose: return (JSON(array), nextNext.successor())
                // invalid json
            default: throw ParseError("invalid json: expect ']' or ',' at \(nextNext)")
            }
        }
        
        // invalid json
        throw ParseError("invalid json: expect ']' or ',' at \(cursor)")
    }
    
    private func parseObject(index: Int) throws -> (JSON, Int) {
        var cursor = eatWhiteSpace(index)
        
        guard string[cursor] == co else {
            // invalid json "{" start array
            throw ParseError("invalid json: expect '{' at \(cursor). ")
        }
        
        // skip "{"
