Flight-School / AnyCodable

Type-erased wrappers for Encodable, Decodable, and Codable values
https://flight.school/books/codable
MIT License
1.28k stars 132 forks source link

Boolean encoding change in 0.6.3 #67

Open mattmassicotte opened 2 years ago

mattmassicotte commented 2 years ago

Hello!

I've noticed that in 0.6.3, the encoding of boolean types has changed in certain circumstances. I've narrowed down the code causing me issues to this:

var options: AnyCodable {
    return [
        "key": true,
    ]
}

In < 0.6.3, this would result in the JSON data {"key": true}. In 0.6.3, it produces {"key": 1}.

pyrou commented 2 years ago

ping @bddq relates to #65