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 pretty print converts ints to strings #117

Closed
malhal opened this issue Sep 22, 2016 · 4 comments
Closed

JSON pretty print converts ints to strings #117

malhal opened this issue Sep 22, 2016 · 4 comments
Labels

Comments

@malhal
Copy link

malhal commented Sep 22, 2016

Noticed this in Version 1.3.14 (19)

Doing request in Safari the ints are fine:
{"id":3,"created_at":"2016-09-22 00:43:49","updated_at":"2016-09-22 00:43:49","password":"123456","venue_id":5,"created_by_id":1,"updated_by_id":1,"bssid":null,"latitude":null,"longitude":null,"ssid":null}

In the client the ints are converted to strings:

screen shot 2016-09-22 at 01 50 02

@mmattozzi mmattozzi added the bug label Sep 23, 2016
@mmattozzi
Copy link
Owner

Thanks... I totally missed this. I was battling a loss of precision with the json parsing library I was using so I modified it to store the original text string rather than parsing the string into a number and then writing that number back out. However, it looks like the writer puts the string in quotes as if it was, well, a string. I'll see if I can fix this.

@mmattozzi
Copy link
Owner

I've fixed this in master by updating my fork of json-framework ... mmattozzi/json-framework@aac08fd

@malhal
Copy link
Author

malhal commented Oct 4, 2016

Sorry at first glance it doesn't look like you have that as a submodule in this repo, please let me know how to test the fix. Thanks!

edit: ah looks like you are using pod files...

@mmattozzi
Copy link
Owner

Yeah, just run pod install to pull in the updates.

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

No branches or pull requests

2 participants