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

weird error message when json.loads() fails #286

Open
DemersM opened this issue Sep 28, 2017 · 0 comments
Open

weird error message when json.loads() fails #286

DemersM opened this issue Sep 28, 2017 · 0 comments

Comments

@DemersM
Copy link

DemersM commented Sep 28, 2017

import ujson

ujson.loads("test")
>>>ValueError: Unexpected character found when decoding 'true'

ujson.loads("foo")
>>>ValueError: Unexpected character found when decoding 'false'

ujson.loads("bar")
>>>ValueError: Expected object or value

It seems that every string that starts by "t" is tried to be decoded by 'true' and the same thing happen with every string that starts by "f"

Not a big deal, but I expected that same error message for any non JSON value string

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

No branches or pull requests

1 participant