Closed Hejle closed 1 year ago
Good catch @Hejle! Thank you for reporting this and creating the PR, it is awesome, I merged it into the Main branch :)
Regarding better renderers for Json support- I agree, this is something that we should take care of. If you want, you can be the champion of this feature. Although first we should outline which changes we want to do, which types we want to custom-render and how much we want to "hide", since every time we add custom renderers for types we hide some of the members of that types, and which otherwise will be shown, we should find the balance.
Let's continue the discussion in #14. I'm closing this issue, since the reported bug has been resolved :)
I was trying to dump a NewtonSoft Json object, when I ran into the following error: Unable to cast object of type 'd__64' to type 'System.Collections.IEnumerable'.
I tried the same with System.Text.Json and got a familiar exception: Unable to cast object of type 'd__18[System.Text.Json.Nodes.JsonNode]' to type 'System.Collections.IEnumerable'.
I have created a fix for this which I will create a pullrequest for in a bit.
Note: Even with the fix, I wouldn't say that Json is Supported. The output after my Pull Request would look like this:![billede](https://github.com/MoaidHathot/Dumpify/assets/18572997/d8594c63-1841-416f-9b85-1b85e6f56576)
To get NewtonSofts output to look nice, it is possible to add a CustomRenderer like this, which will format the output nicely: