Updated json parsing and decoding