We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
At https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Linq/JObject.cs#L544 ContainsKey is not public. Where I could do
float x = hash.ContainsKey('x') ? (float)hash['x'] : 0f;
I am needing to write
float x; JToken t; if (hash.TryGetValue('x', out t)) { x= (float)t; } else { x = 0f; }
Or am I missing something?
Thanks
The text was updated successfully, but these errors were encountered:
@ambs you could cast the JObject to a IDictionary<string, JToken> to get access to ContainsKey (though I agree you shouldn't have to)
JObject
IDictionary<string, JToken>
ContainsKey
Sorry, something went wrong.
Yep, can't recall how, but I solved the issue. But always good to have it explicitly.
I meant to make it public in 10 but I forgot. It will be public in 11.
Done a138852
No branches or pull requests
Hi
At
https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Linq/JObject.cs#L544
ContainsKey is not public.
Where I could do
I am needing to write
Or am I missing something?
Thanks
The text was updated successfully, but these errors were encountered: