You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2024. It is now read-only.
A simple model like this fails to encode and then decode successfully:
This is because like
DateandDatatypes,URLs also need to be handled as a special case by coders.Here's how they're handled in the Swift JSONEncoder:
https://github.com/apple/swift-corelibs-foundation/blob/943fee90d095a1708da826e7641636a3cbe9642e/Sources/Foundation/JSONEncoder.swift#L445
If left to encode themselves, URLs create a base/relative URL part, whereas the JSONEncoder just outputs the
absoluteStringas a normalStringfield.