Skip to content

Conversation

@viirya
Copy link

@viirya viirya commented May 23, 2016

Currently jackson supoorts 'Infinity' and '+Infinity' for positive infinity. However, it only supports '+INF'. If there is no special reason to skip this support, it should be better to be consistent.

@cowtowncoder
Copy link
Member

@viirya I would like to know where such value is used first, if you happen to have a link? I try to avoid adding speculative features, since there are potentially unlimited number of things that might be used; and specifically so in case of deviations from JSON specification.
I don't have objection to addition itself, if such usage exists in the wild.

@viirya
Copy link
Author

viirya commented May 24, 2016

I am working on this to make allowNonNumericNumbers option work on Spark JSON datasource. I found that for positive infinity, 'Infinity', '+Infinity' and '+INF' works but 'INF' doesn't. This is an inconsistent behavior as I think. Although I don't think this update can be included soon, to have consistent behavior might be better.

@cowtowncoder
Copy link
Member

@viirya just because set of value is not symmetric does not have much relevance. Rather I'd want to keep set minimal with respect to values that are actually used. JDK, for example, allows smaller set of not-a-number values; XML Schema specifies an overlap. These are sources from which currently supported values are added.
Since these values are NOT valid JSON to begin with, I want to keep the set of values as small as possible.

So: if there is actual -- not potential or possible -- usage, new values may be added.

@viirya
Copy link
Author

viirya commented May 24, 2016

Ok, got it. Thanks @cowtowncoder. I would close this since you have the concern.

@viirya viirya closed this May 24, 2016
@cowtowncoder
Copy link
Member

@viirya Thanks!

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