Skip to content

Partial Mode generating unexpected keys #174

Closed
@luizbezerra-pinheiro

Description

@luizbezerra-pinheiro

After upgrading from version 0.7.1 to version 0.8.0, after some struggle spotting from where did my error come from, I found out that the partial mode wasn't working as expected.

How to replicate the bug:

  1. Upgrade the package
    pip install jiter==0.8.0

  2. Get a partial and incomplete JSON and try to parse it using jiter:

>>> from jiter import from_json
>>> from_json(b'{\n "mykeyname": "hello there", \n', partial_mode=True)
{'__builtim': 'ÈîPÙªª\x00\x00hel'}

After downgrading to version 0.7.1:

>>> from jiter import from_json
>>> from_json(b'{\n "mykeyname": "hello there", \n', partial_mode=True)
{'mykeyname': 'hello there'}

System information:
Python 3.12.7 (main, Oct 29 2024, 14:29:28) [GCC 11.4.0] on linux

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