added some type hints, distinguish as-file and as-writer in the json module, bump for 0.2.2