completed read/write JSON parser