Skip to content

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