According to this answer on StackOverflow:
Json.NET includes many features which are not part of JSON specification. In particular, it allows parsing some JSON files which are "officially" invalid. This includes unquoted properties, comments, constructors etc.
These are all the types assignable from JToken
:
JArray
JConstructor
JContainer
JObject
JProperty
JRaw
JValue
Please tell if the following are true:
It is not possible that JToken.Parse(json)
on an "officially" valid json will in its descendants contain JConstructor
or JRaw
.
Provided that a json is "officially" valid, one can expect only the following types to see in those descendants: JArray
, JObject
, JProperty
, JValue
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…