Code Monkey home page Code Monkey logo

Comments (4)

loganwright avatar loganwright commented on August 17, 2024

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:

  1. 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.

  1. 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.

max-potapov avatar max-potapov commented on August 17, 2024

Thanks. I'll try second option due to Core Data roots (Int16/32/64/NSNumber).

from genome.

loganwright avatar loganwright commented on August 17, 2024

@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.

max-potapov avatar max-potapov commented on August 17, 2024

@loganwright Just checked with latest release: everything works fine. Thank you!

from genome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.