Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonSerializer private in EntitySerializer #13

Open
Diaaz opened this issue Apr 5, 2017 · 2 comments
Open

JsonSerializer private in EntitySerializer #13

Diaaz opened this issue Apr 5, 2017 · 2 comments
Assignees

Comments

@Diaaz
Copy link

Diaaz commented Apr 5, 2017

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?

@tpluscode
Copy link
Contributor

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
Copy link
Contributor

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

@tpluscode tpluscode self-assigned this Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants