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

respect integer types #32

Merged
merged 1 commit into from
Feb 19, 2017
Merged

respect integer types #32

merged 1 commit into from
Feb 19, 2017

Conversation

vrichter
Copy link
Contributor

When integer values are saved into a json document they are always treated as float:

>> a = [ int64(1487075890726396) int64(1487075890726397) ]
a =

  1487075890726396  1487075890726397

>> savejson(a)
ans = {
        "a": [1.487075891e+15,1.487075891e+15]
}

Was this intended?

This patch fixes this by using integer format. It may be even better to add an option for IntFormat.

@fangq fangq merged commit 4a09ac3 into NeuroJSON:master Feb 19, 2017
@fangq
Copy link
Member

fangq commented Feb 19, 2017

thank you! patch accepted.

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

Successfully merging this pull request may close these issues.

2 participants