I am using Java to create a program that saves data from a game's API. While the game is running, the API is hosted on http://localhost:6721/session. The webpage displays raw JSON formatting (seen in image below).
How can I save the data from the webpage to a JSON/txt file?
Small portion of what would be displayed on the webpage
{"client_name":"gr1ffin","sessionid":"1C32B3DA-F1F6-4B17-8BAE-FD1BC59C28BD","sessionip":"100.100.00.100","match_type":"Echo_Arena","map_name":"mpl_arena_a","game_clock":215.09978,"game_clock_display":"03:35.09","private_match":false,"total_round_count":1,"blue_round_score":0,"orange_round_score":0,"blue_points":2,"orange_points":4,"tournament_match":false,"blue_team_restart_request":0,"orange_team_restart_request":0,"right_shoulder_pressed":0,"right_shoulder_pressed2":0,"left_shoulder_pressed":}
I don't need to preserve any type of formatting if that makes anything easier, just need to save the data. Thanks in advance.