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
I have one case related to decoding JSON, while I have created a model based on the JSON structure which is dictionary but the data that I need is in nested fields with an array type, not at the root level.
Based on the architecture of your application how I can go directly to nested filed to get array because I got the below error once I am trying to parse the actual JSON retrieved from API.
Error:
typeMismatch(Swift.Array, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array but found a dictionary instead.", underlyingError: nil))
The text was updated successfully, but these errors were encountered:
Hey, I'd be able to help if you provide a concrete json example and the data structures you currently use for parsing. This might be helpful as well: encoding and decoding custom types
Thanks @nalexn for your quick response, I have found how I can go to nested items from web-repository to be mapped with data structure at interactors.
Below the line code that I have updated in your great sample app.
I have one case related to decoding JSON, while I have created a model based on the JSON structure which is dictionary but the data that I need is in nested fields with an array type, not at the root level.
Based on the architecture of your application how I can go directly to nested filed to get array because I got the below error once I am trying to parse the actual JSON retrieved from API.
Error:
typeMismatch(Swift.Array, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array but found a dictionary instead.", underlyingError: nil))
The text was updated successfully, but these errors were encountered: