made some changes to json handler for deserializing JSON