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

JNumber should be Number not double #8

Closed
delebedev opened this issue Jun 24, 2014 · 2 comments
Closed

JNumber should be Number not double #8

delebedev opened this issue Jun 24, 2014 · 2 comments

Comments

@delebedev
Copy link

From my point of view, it's really annoying that all values are encoded and decoded as double, in some cases this behaviour might be even buggy.
I propose to let caller side decide how to unwrap returned Number - as Double, Int, whatever

@delebedev delebedev added the bug label Jun 24, 2014
@lingoer
Copy link
Member

lingoer commented Jun 24, 2014

Nice idea.
It did bothered me, too.
In one of the first commits it was a NSNumber, But, I Changed that later.
Because I don't want any NSThings come out from the value ------ The Cocoa things always comes with implicitly-unwrapped-optionals. Which I think , is not following the fundamental ideas of Swift language.
If there has a way simple and explicit as basic types yet functional as NSNumber, I'd be very happy to use that.
I need a few time to think about it.

@lingoer
Copy link
Member

lingoer commented Jun 25, 2014

I give up.
Chosen NSNumber finally.
Addition two methods provided

@lingoer lingoer closed this as completed Jun 25, 2014
nghuiqin pushed a commit to nghuiqin/SwiftyJSON that referenced this issue Sep 20, 2016
* Kitura/Kitura#590 Migrate to 06/20 binaries

* Added swift version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants