Here's a copy of the data I'm using...
$inputdata = @"
{
"operation": {
"details": {
"title": "Windows Patch Night",
"technician": "administrator",
"stagename": "close",
"reasonforchange": "Patch updates",
"statusname": "completed",
"statuscomments": "This was an automated patch through WSUS",
"priority": "normal",
"requestedby": "administrator",
"risk": "low",
"assets": [
contoso.microsoft.com
],
"impact": "medium",
"urgency": "normal",
"changemanager": "administrator",
"changetype": "standard",
"category": "Patching",
"group": "Server",
"description": "Windows Patches",
"scheduledstarttime": "2 Nov 2018, 21:00:00",
"servicesaffected": [
"email",
"hardware"
]
}
}
}
"@