Skip to content

yajl2_c doesn't parse decimals correctly#1

Closed
jpmckinney wants to merge 1 commit intoICRAR:masterfrom
jpmckinney:patch-1
Closed

yajl2_c doesn't parse decimals correctly#1
jpmckinney wants to merge 1 commit intoICRAR:masterfrom
jpmckinney:patch-1

Conversation

@jpmckinney
Copy link
Copy Markdown

import ijson.backends.yajl2_c as ijson
from io import BytesIO

list(ijson.items(BytesIO(b'1.1'), ''))
> [Decimal('1.100000000000000088817841970012523233890533447265625')]

If I use yajl2_cffi, parsing is correct:

import ijson.backends.yajl2_cffi as ijson
from io import BytesIO

list(ijson.items(BytesIO(b'1.1'), ''))
> [Decimal('1.1')]

Since you disabled issues, there is no way to report bugs like this…

Using yajl 2.1.0 on macOS.

@rtobar
Copy link
Copy Markdown

rtobar commented Aug 2, 2019

Sorry for the delay, I just saw this PR.
I'm a bit confused though. Are you just reporting a bug, or are planning to write some code that you want me to pull?

@rtobar rtobar closed this in c4415f7 Aug 2, 2019
@rtobar
Copy link
Copy Markdown

rtobar commented Aug 2, 2019

Anyhow, this is now fixed on the master branch.

@jpmckinney jpmckinney deleted the patch-1 branch August 2, 2019 12:21
@jpmckinney
Copy link
Copy Markdown
Author

Thanks! Yes, it is just reporting a bug, but Issues are disabled in the repo, so there is no way to do it otherwise…

@rtobar
Copy link
Copy Markdown

rtobar commented Aug 2, 2019

Ah, I hadn't realized, thanks for pointing out! I enabled them now.

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