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

Serialize a 0 int value #258

Closed
ranxian opened this issue May 15, 2017 · 3 comments
Closed

Serialize a 0 int value #258

ranxian opened this issue May 15, 2017 · 3 comments

Comments

@ranxian
Copy link

ranxian commented May 15, 2017

I tried to serialize

class A {
  public int number {get; set;} = 0;
}

when number is 0, there is nothing serialized. I was expecting something like

number: 0
@Bond-009
Copy link

Default values are not emitted unless you call .EmitDefaults() on the SerializerBuilder.

@aaubry
Copy link
Owner

aaubry commented Jul 13, 2017

Closing because this is a duplicate of #251

@aaubry
Copy link
Owner

aaubry commented Aug 15, 2019

I have opened issue #427 that is related to your question. Feel free to join the discussion and provide any feedback that might be relevant.

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

3 participants