Server takes form
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user