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

Readme example raises TypeError #53

Open
u3Izx9ql7vW4 opened this issue Aug 17, 2024 · 0 comments
Open

Readme example raises TypeError #53

u3Izx9ql7vW4 opened this issue Aug 17, 2024 · 0 comments

Comments

@u3Izx9ql7vW4
Copy link

Example given in readme throws the following error:

    json_parsed = parser.loads(json_bytes)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 'content' has incorrect type (expected str, got bytes)

Example copied from read me that throws this error:

import cysimdjson

json_bytes = b'''
{
  "foo": [1,2,[3]]
}
'''

parser = cysimdjson.JSONParser()
json_parsed = parser.loads(json_bytes)

# Access in a Python way
print(json_parsed.json_parsed['foo'])
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