Skip to content

Documentation for Pythonic drop-in API is wrong #38

Description

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

# Access using JSON Pointer
print(json_parsed.json_parsed['foo'])
  1. passing bytes to parser.loads returns a TypeError: the param is expected to be str https://github.com/TeskaLabs/cysimdjson/blob/main/cysimdjson/cysimdjson.pyx#L454
  2. even passing str json_parsed has no json_parsed element, like it is written in the print example

I ended up doing something like:

parser.parse(payload).get_value()

I still have to validate that's what I need :)
(at the moment I'm parsing only and not accessing the object)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions