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
It seems that after pull request #53 JSONCodable got functionality for encoding/decoding nested types (9782c0f). However the problem we are having is that our API JSON responses have some keys with . in them. This makes it impossible to encode (and probably parse) the JSONs using the library.
For example this JSON is not parseable correctly with the lib:
{
"one.key" = "value"
}
Is there a way to fallback to a more low-level approach avoiding the key.components(separatedBy: ".") part in each of func encode(_ value: key:) overload?
The text was updated successfully, but these errors were encountered:
This seems to be more of an edge case while what we optimized for seemed to be more common and expected. Your welcome to submit a PR for this functionality as perhaps an OptionSet on the JSONEncoder initializer, otherwise we will keep this in mind for potential implementation in the future.
It seems that after pull request #53 JSONCodable got functionality for encoding/decoding nested types (9782c0f). However the problem we are having is that our API JSON responses have some keys with
.
in them. This makes it impossible to encode (and probably parse) the JSONs using the library.For example this JSON is not parseable correctly with the lib:
Is there a way to fallback to a more low-level approach avoiding the
key.components(separatedBy: ".")
part in each offunc encode(_ value: key:)
overload?The text was updated successfully, but these errors were encountered: