Newtonsoft's CASE Insensitive selecting path to a jason token



The following codes allow us travel select key path regardless of whether you're using upper or lower case.

var objectJson = JObject.Parse(validJsonObject);

objectJson.GetValue(jsonPathKey, StringComparison.OrdinalIgnoreCase).Value();


Comments

Rickey said…
This doesn't select a path. SelectToken is for paths. GetValue only goes one level deep (you can't have a dot).

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm