System.Text.Json seems to have limited abilities in terms of writing/creating a JsonDocument. So we need migrate the runtime to use Newtonsoft.Json instead of System.Text.Json to achieve the relevant functionalities like creating JArray with elements etc.