def _txtinfo_to_jsoninfo(self, data):
<EOL>data = data.replace('<STR_LIT>', '<STR_LIT>')<EOL>lines = data.split('<STR_LIT:\n>')<EOL>try:<EOL><INDENT>start = lines.index('<STR_LIT>') + <NUM_LIT:2><EOL>end = lines[start:].index('<STR_LIT>') + start<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ParserError('<STR_LIT>')<EOL><DEDENT>topology_lines = lines[start:end]<EOL>topology = []<EOL>for line in topology_lines:<EOL><INDENT>values = line.split('<STR_LIT:\t>')<EOL>topology.append({<EOL>'<STR_LIT>': values[<NUM_LIT:0>],<EOL>'<STR_LIT>': values[<NUM_LIT:1>],<EOL>'<STR_LIT>': float(values[<NUM_LIT:2>]),<EOL>'<STR_LIT>': float(values[<NUM_LIT:3>]),<EOL>'<STR_LIT>': float(values[<NUM_LIT:4>]) * <NUM_LIT><EOL>})<EOL><DEDENT>try:<EOL><INDENT>start = lines.index('<STR_LIT>') + <NUM_LIT:2><EOL>end = lines[start:].index('<STR_LIT>') + start<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ParserError('<STR_LIT>')<EOL><DEDENT>mid_lines = lines[start:end]<EOL>mid = []<EOL>for line in mid_lines:<EOL><INDENT>values = line.split('<STR_LIT:\t>')<EOL>node = values[<NUM_LIT:0>]<EOL>aliases = values[<NUM_LIT:1>].split('<STR_LIT:;>')<EOL>mid.append({<EOL>'<STR_LIT>': node,<EOL>'<STR_LIT>': [{'<STR_LIT>': alias} for alias in aliases]<EOL>})<EOL><DEDENT>return {<EOL>'<STR_LIT>': topology,<EOL>'<STR_LIT>': mid<EOL>}<EOL>
converts olsr 1 txtinfo format to jsoninfo