JsonLD.Entities icon indicating copy to clipboard operation
JsonLD.Entities copied to clipboard

JsonSerializer private in EntitySerializer

Open Diaaz opened this issue 7 years ago • 2 comments

Hi,

I would like to add some custom JsonConverters to the jsonSerializer, because my entities have types that cannot be converted to json with the default jsonconverters. Is it possible to make the JsonSerializer public in EntitySerializer? Or is there another way to add converters to the serializer?

Diaaz avatar Apr 05 '17 06:04 Diaaz

Actually there was a point when I considered that. In the end I didn't need that though and always use the attribute

public class MyEntity 
{
    [JsonConverter(typeof(MyConverter))]
    public CustomValue MyProperty { get; set; }
}

Is this something you can do in your code?

tpluscode avatar Apr 05 '17 09:04 tpluscode

Ah, and I think that you place that attribute on a class too

tpluscode avatar Apr 06 '17 11:04 tpluscode