added json reading and parsing