Comments (4)
Hi @max-potapov
Thanks for checking out the library! I'm going to see what I can do on my end to prevent errors like this from happening but for now, here's what's going on.
In JSON, we're unsure the specific type of a number so it bridges to _NSCFNumber which can be automatically converted to types like: Int
, Double
, and Float
.
Unfortunately, it looks like its choking on Int64
. (and I imagine other types, such as UInt8
, etc...
There's two fixes temporarily:
- Use
Int
I'd probably do this. The highest supported architecture at the moment is 64 bit, so you should be fine using just Int
unless you really want to limit to 64 bit number.
- Transform
try id <~> map["id"]
.transformFromJson { (input: Int) -> Int64 in return Int64(input) }
Let me know if I can help with anything else!
- Logan
from genome.
Thanks. I'll try second option due to Core Data roots (Int16/32/64/NSNumber).
from genome.
@max-potapov Using the new type system, all Integer types should be supported. Let me know if you run into problems upgrading, there are some other syntax changes as well.
from genome.
@loganwright Just checked with latest release: everything works fine. Thank you!
from genome.
Related Issues (20)
- Abandoned Repo
- How to use Genome in Swift 4.2 HOT 1
- Can't build with Carthage HOT 5
- Error: method 'newInstance(_:context:)' in non-final class 'ChecklistItem' must return `Self` to conform to protocol 'JsonConvertibleType' HOT 1
- 'String' is not convertible to 'KeyType' HOT 2
- Problem with restoring data HOT 4
- Swift 3 / Xcode 8 / Carthage: usable version available soon? HOT 7
- Node alternative to Json.deserialize(string) and Json.serialize(style)? HOT 4
- Swift 3: Date unconditionallyBridgeFromObjectiveC exception HOT 4
- version 3.1.0 not work in Carthage HOT 16
- Missing sections in README.md HOT 2
- Dealing with optional variables (basic types and enum) HOT 3
- Include map key in error message HOT 1
- Update Podspec
- Updated CoreData Example
- Core Data initialization HOT 1
- Add copyright
- sub-map node not change when mapping
- Swift 4 HOT 1
- User Defaults HOT 1
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 genome.