|
Hi community, Sorry for the basic question, but since yesterday I am not able to decode this JSON data. I have implemented the Bundle-Decodable from the Moonshot project. Getting this error: Fatal error: Failed to decode scales.json from bundle.
This is my struct:
Bundle-Decodable:
My DataManager:
Thanks for the support. Renato. |
|
Instead of this:
give yourself a chance to see what the error is:
and see what gets printed to the console. If you search around here on the forums, you can even find other ways of doing a similar thing that give you a prettier, more user-friendly error description, but I find the above works well enough. For this particular case, I would suggest taking a closer look at your JSON keys compared to the corresponding property names in your structs. |
|
Thanks for the code and help. I found the error on the noteValue key. There was a ":" inside. Here is the error message.:
Thanks again, Renato. |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.