simplified reading and writing json