You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var result="{"count":2,"doms":["gateway","occ"]}"
var json = System.Text.Json.Nodes.JsonNode.Parse(result).AsObject();
var count = json["count"]?.GetValue() ?? 0;
var data = json["doms"]?.GetValue<List>() ?? new List();
“json["doms"]?.GetValue<List>()”引发了类型“System.InvalidOperationException”的异常
Data: Count = 0
HResult: -2146233079
HelpLink: null
InnerException: null
Message: "The node must be of type 'JsonValue'."
Source: "System.Text.Json"
StackTrace: " 在 System.Text.Json.Nodes.JsonNode.GetValueT"
TargetSite: {T GetValueT}
The text was updated successfully, but these errors were encountered:
var result="{"count":2,"doms":["gateway","occ"]}"
var json = System.Text.Json.Nodes.JsonNode.Parse(result).AsObject();
var count = json["count"]?.GetValue() ?? 0;
var data = json["doms"]?.GetValue<List>() ?? new List();
“json["doms"]?.GetValue<List>()”引发了类型“System.InvalidOperationException”的异常
Data: Count = 0
HResult: -2146233079
HelpLink: null
InnerException: null
Message: "The node must be of type 'JsonValue'."
Source: "System.Text.Json"
StackTrace: " 在 System.Text.Json.Nodes.JsonNode.GetValueT"
TargetSite: {T GetValueT}
The text was updated successfully, but these errors were encountered: