Snippets created by Nat Elkins

  • JsonValue JsonConverter

    Not super efficient, and doesn't work on every case, but works most of the time. Json.NET JsonConverter for a JsonValue, i.e. JsonValueConverter. If you're using with a converter for discriminated unions, be sure to give this one higher precedence (since JsonValue is implemented as a DU).

    2 people like this

    Posted: 2 months ago by Nat Elkins

  • Poor man's HTML renderer

    Takes some HTML, outputs some plaintext. Not tail recursive, not efficient, but got the job done for my use case (had a product feed where the descriptions were HTML, but I needed plaintext).

    3 people like this

    Posted: 5 days ago by Nat Elkins