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