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

Suggestion for resolver improvement #12

Open
novitae opened this issue Dec 3, 2024 · 0 comments
Open

Suggestion for resolver improvement #12

novitae opened this issue Dec 3, 2024 · 0 comments

Comments

@novitae
Copy link

novitae commented Dec 3, 2024

In order to improve the capabilities of the resolver, it might be interesting to add the source of the value. E.g:

def resolver(t, source):
    print(t, source)
    return barely_json.default_resolver(t, source)

barely_json.parse("{hello: world}", resolver=resolver)
barely_json.parse("[hi, {hello: world}]", resolver=resolver)
hello key
world value
hi item
hello key
world value
@novitae novitae mentioned this issue Dec 3, 2024
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