parse response and decode json