func encode()

in Sources/Confidence/StructFlagSchema.swift [30:48]


    func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)

        let empty: [String: String] = [:]
        switch self {
        case .structSchema(let structSchema):
            try container.encode(structSchema, forKey: .structSchema)
        case .listSchema(let elementSchema):
            try container.encode(elementSchema, forKey: .listSchema)
        case .intSchema:
            try container.encode(empty, forKey: .intSchema)
        case .doubleSchema:
            try container.encode(empty, forKey: .doubleSchema)
        case .stringSchema:
            try container.encode(empty, forKey: .stringSchema)
        case .boolSchema:
            try container.encode(empty, forKey: .boolSchema)
        }
    }