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

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type