Being rather the static-typing-in-Python kind of person, and being rather taken with Microsoft’s new Typescript, I quickly cleaned up and reimplemented my JSON validator as a Python 3 annotations parser:
def add_employee(employee: {"name":str,"dob":int, ...}) -> int:
It also has a JSON load/dump wrapper that supports a template parameter:
employees = json.load(f,template=[{"id":int,"name":str,"dob":int, ...}])
My ambition would be that its syntax is widely adopted and eventually static type checkers support it and IDEs can do auto-complete ala Typescript.
follow/fork it on github: https://github.com/williame/obiwan