     public init(_ value: Float) {
         self = .Number(Double(value))
     }
-   
-    /** 
-    * Double floating value of this JSON, only for number value
-    */
+    
+    /**
+     * Double floating value of this JSON, only for number value
+     */
     public var double : Double? {
         switch self {
-            case .Number(let x): return x
-            default: return nil
-        }
-    }
-    
-    /** 
-    * Single floating value of this JSON, only for number value
-    */
+        case .Number(let x): return x
+        default: return nil
+        }
+    }
+    
+    /**
+     * Single floating value of this JSON, only for number value
+     */
     public var float : Float? {
         switch self {
-            case .Number(let x): return Float(x)
-            default: return nil
+        case .Number(let x): return Float(x)
+        default: return nil
         }
     }
 }

//MARK: - Parser
extension JSON {
    /**
    * parse json from string, return nil and error message if parse error occurred 
    */
    public static func parse(string: Swift.String) -> (JSON?, Swift.String?) {
        let (json, _) = Parser(string).parse()
        switch json {
            case .None(let error): return (nil, error)
            default: return (json, nil)
        }
    }
}


        self = .Array(_ArrayBox(array))
    }
    
    /**
     * Internal Array container of this JSON
     */
    public var array : [JSON]? {
        switch self {
        case .Array(let x): return x.array
        default: return nil
        }
    }
    
    /**
     * Append newElement to the Array JSON.
     */
    public func append(newElement: JSON) {
        switch self {
        case .Array(let x): x.array.append(newElement)
        default: break
        }
    }
    
    /**
     * Remove and return the child json at index i.
     */
    public func removeAtIndex(index: Int) -> JSON? {
        switch self {
        case .Array(let x): return x.array.removeAtIndex(index)
        default: return nil
        }
    }
}
