Server takes form

This commit is contained in:
Jonas Linter
2025-09-25 11:33:54 +02:00
parent 35da6d3c24
commit 6925dd734c
6 changed files with 678 additions and 333 deletions

View File

@@ -25,6 +25,13 @@ def main():
parsed_result = parser.from_string(xml, OtaPingRq)
print(parsed_result.echo_data)
# save json in echo_data to file with indents
output_path = "parsed_echo_data.json"
with open(output_path, "w", encoding="utf-8") as out_f:
import json
json.dump(json.loads(parsed_result.echo_data), out_f, indent=4)
print(f"Saved echo_data json to {output_path}")