Anarchist
Deserialise part of a json response
Hello, how could I use newtonsoft to deserialise part of a large json response into a smaller set of objects? e.g. if the response is...
...how would I extract just an array of the elements in result, with only some params, e.g.
[ { "a", 1 }, { "b" , 2 } ]
12 replies
❔ Are TryAsync methods acceptable?
I've just been refactoring some implementations of a method I have to go from
T Load()
to bool TryLoad(out T? result)
, which as far as I'm concerned is not an anti pattern. I was about to do the same for my Task<T> LoadAsync
methods but am wondering if this is bad practice and having bool TryLoadAsync(out Task<T?> result)
may have some unforeseen consequences?10 replies