Improved generic parsing of server response