AngryAnt
AngryAnt
CC#
Created by AngryAnt on 10/26/2023 in #help
System.Text.Json parsing property with dot in it
I have a third party server spewing a json response I need to parse. It is a single-string-property response with the property name containing a dot. How do I go about extracting the string value via System.Text.Json? Ex:
{
"m.server": "value I want to read"
}
{
"m.server": "value I want to read"
}
With jq I would get at it via jq '.["m.server"]' (where if the property was just "server", the syntax would just be jq '.server'), but I have not come across this issue in a .net context before.
6 replies
CC#
Created by AngryAnt on 5/26/2023 in #help
❔ Gleaning process launch information from Process reference attained via GetProcessById?
Given a process ID I would like to determine all parameters necessary to relaunch that process (same parameters, environment, etc.). How could this be done? I am currently monitoring the process via Process.GetProcessById and waiting for its exit, after which I do some processing. At the end of that processing I would like to relaunch the previously monitored process.
25 replies