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

Deserializing with JSON.NET not working for class references #14

Closed
carldebilly opened this issue Feb 12, 2018 · 2 comments
Closed

Deserializing with JSON.NET not working for class references #14

carldebilly opened this issue Feb 12, 2018 · 2 comments
Labels

Comments

@carldebilly
Copy link
Member

carldebilly commented Feb 12, 2018

This won't deserialize :

public class A
{
    public string Str1 { get; }
}

public class B
{
    public A MyA { get; }
}

[...]
var b = JsonConvert.DeserializeObject<B>(json);
@carldebilly carldebilly added bug Something isn't working immutable-generator labels Feb 12, 2018
@carldebilly carldebilly changed the title Deserializing with JSON.NET not working for class hierarchy Deserializing with JSON.NET not working for class references Feb 12, 2018
@carldebilly
Copy link
Member Author

carldebilly commented Feb 12, 2018

Proposed solution would be to generate a custom creation converter when a dependency to JSON.NET is detected.

@carldebilly
Copy link
Member Author

Fixed in PR #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant