Comments (3)
Hello @christophedebatz,
Looks like you have Core Data model and there's a problem with it, rather than JSON parsing. The crash log says that your User
model doesn't have the id
property. You need to make sure that the properties for your model are properly generated.
To narrow down the issue, did you try parsing the id to a temporary variable first before assigning it to your model? E.g.:
var id: Int32 = 0
id <-- json["id"]
createdUser.id = id
from arrow.
Hi @maxkonovalov
I will test your solution. Hope I will have time to come back here.
By the way, nice library.
Regards.
from arrow.
@maxkonovalov @christophedebatz
How is your Int
in your JSON file? is it like 123
or "123"
.
If your int is in the string form in the JSON, then Int32
parsing will fail.
We can add this line In the library in the future to support String
to Int32
parsing
case is Int32.Type: if let v = Int32(string) { left = v as? T }
Hope this helps :)
from arrow.
Related Issues (19)
- Doesn't compile with snapshot 4-12 HOT 5
- Value of type 'JSON' has no member 'collection' HOT 2
- Array of enums HOT 5
- Is the swift 3 branch stable? HOT 6
- No inheritance on Structs HOT 2
- Release 3.0.3 not available on master HOT 1
- <== not working for me HOT 6
- Does this library allow to serialize a JSON string to an object? HOT 4
- Get notified if a key is missing HOT 3
- please make dateFormatter in Arrow.swift public HOT 4
- Swift 4 HOT 3
- Codable HOT 3
- Support optional data for custom models
- How do I instantiate a model directly from a string containing json? HOT 4
- How do you use Arrow with Moya+RxSwift HOT 5
- netsted values problem
- Doesn't compile on Linux OS HOT 1
- Privacy Manifest HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrow.