Skip to content

Instantly share code, notes, and snippets.

View idea-lei's full-sized avatar

Lei idea-lei

View GitHub Profile
@chrisoldwood
chrisoldwood / CustomJsonConverter.cs
Last active February 17, 2023 23:16
Example showing infinite loop deserialising polymorphic types with a custom JsonConverter.
namespace JsonTests
{
public class CustomJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return typeof(BaseType).IsAssignableFrom(objectType);
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
@davidfowl
davidfowl / dotnetlayout.md
Last active April 14, 2025 07:13
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/