App crashing on iOS JSON encode

Crashed: com.apple.root.user-initiated-qos.cooperative 0 Foundation 0x4e2a4 specialized String.withUTF8<A>(:) + 100 1 Foundation 0x4eb8c JSONWriter.serializeString(:) + 100 2 Foundation 0x4e810 JSONWriter.serializeJSON(:depth:) + 92 3 Foundation 0x4cfd4 JSONWriter.serializeObject(:depth:) + 888 4 Foundation 0x4e914 JSONWriter.serializeJSON(:depth:) + 352 5 Foundation 0xd06fc JSONEncoder.encode<A>(:) + 624 6 Foundation 0xd0484 dispatch thunk of JSONEncoder.encode<A>(_:) + 56

Can you post a full crash report? See Posting a Crash Report.

But also can you post a small snippet of code that demonstrates the problem? Can you narrow it down to any specific property on your encodable type?

App crashing on iOS JSON encode
 
 
Q