Hi,
I’m trying to fetch JSON Scalar data from an API, but it’s being decoded as a String and it fails. The data I’m waiting for is of type: [String: Int].
This is the error message:
couldNotConvert(value: AnyHashable([AnyHashable(“stringValue1”): AnyHashable(5), AnyHashable(“stringValue2”): AnyHashable(5), AnyHashable(“stringValue3”): AnyHashable(5), AnyHashable(“stringValue4”): AnyHashable(5), AnyHashable(“stringValue5”): AnyHashable(4), AnyHashable(“stringValue6”): AnyHashable(5), AnyHashable(“stringValue7”): AnyHashable(5), AnyHashable(“stringValue8”): AnyHashable(5), AnyHashable(“stringValue9”): AnyHashable(5), AnyHashable(“stringValue10”): AnyHashable(5)]), to: Swift.String)
What can I do?
Thank you.