Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON data cannot convert to [[String:Any]] #575

Closed
brhoomjs opened this issue Apr 8, 2020 · 4 comments
Closed

JSON data cannot convert to [[String:Any]] #575

brhoomjs opened this issue Apr 8, 2020 · 4 comments

Comments

@brhoomjs
Copy link

brhoomjs commented Apr 8, 2020

Hello there am so thankful for your awesome job in this repo, this is my first time using it.
I an issue to sync some data
I tried by Alamofire, Networking and even from local JSON File.
the problem is I think to use this JSON as [[String:Any]]
here's the JSON content from the API and local file.
{ "id": 377, "fullname": "Francisco larrere", "avatar": "default.png", "country": "AR", "phone": 54200000000, "email": "franci****@hotmail.com", "horses": [ { "id": 103, "gender": 4, "type": 0, "sold": 0, "image": "5e42d06168f61-103.jpg" }, { "id": 102, "gender": 4, "type": 0, "sold": 0, "image": "5e42cfd8b7c94-102.jpg" } "privateHorses": [] }
and here's my model:
Screen Shot 2020-04-08 at 6 30 53 AM
Screen Shot 2020-04-08 at 6 31 13 AM

and my code:
Local
Screen Shot 2020-04-08 at 6 35 36 AM
Networking
Screen Shot 2020-04-08 at 6 36 20 AM

@rlester
Copy link
Collaborator

rlester commented Apr 14, 2020

My initial guess without seeing the actual error message would be that the privateHorses key is not matching the name of the core data relationship (horses).

Give this a try: https://github.com/3lvis/Sync#attribute-mapping

@rlester
Copy link
Collaborator

rlester commented Apr 27, 2020

@brhoomjs any luck resolving this?

@brhoomjs
Copy link
Author

@brhoomjs any luck resolving this?

Sorry for the delay I want to rebuild my project and orgnize it. I need sometime. when I come for the networking part I'll reply here.

@3lvis
Copy link
Owner

3lvis commented Jun 4, 2020

Closing this, hopefully @brhoomjs found the issue. And sorry for the delay!

@3lvis 3lvis closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants