✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
var el = JsonDocument.Parse(@"""42""").RootElement;
try
{
System.Console.Write(el.GetInt32());
}
catch (Exception e)
{
System.Console.Write(e.GetType().Name);
}