 
 extension JSON: Encodable {
 
-    func encode(to encoder: Encoder) throws {
+    public func encode(to encoder: Encoder) throws {
         var container = encoder.singleValueContainer()
         switch self {
         case let .array(array):



extension JSON: Decodable {
    init(from decoder: Decoder) throws {
        if let container = try? decoder.container(keyedBy: AnyCodingKeys.self) {
            self = JSON(from: container)
        } else if let container = try? decoder.unkeyedContainer() {

}


public enum JSON {
    case null
    case boolean(Bool)
    case number(Double)
