I am wanting to know if it is possible to pickup JSON text from a server using a GET request, and then output that data into a local file in JSON format.
The only thing I can seem to find is this call:
File.WriteAllText(AgentWorkingDirectory & "\json.txt", JsonConvert.SerializeObject(return_message))`
Which only seems to give me a continous line of unformatted text.
So instead of this:
{
    "AlertingRules":[
        {  
            "RuleId":1,
            "Name":"Unprocessed Directory",
            "RuleConditions":[
                {  
                    "Name":"FileCount",
                    "FileName":"",
                    ...
I get this:
{"AlertingRules":[{"RuleId":1,"Name":"Unprocessed Directory","RuleConditions":[{"Name":"FileCount","FileName":null,...
 
     
    