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

A field with a SerializedName in common with another field isn't included in serialized output #76

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1.

public class Test {
 @SerializedName("a")
 public Integer b;
 public Double a;
}

2.

Test t = new Test();
t.b = 3;
gson.toJson(t)

What is the expected output? What do you see instead?

Expect: {"a":3}
Actual: {}

What version of the product are you using? On what operating system?

This works as expected in v1.2.2, but broke in one of the more recent builds.


Original issue reported on code.google.com by ch...@gmail.com on 26 Nov 2008 at 9:06

@GoogleCodeExporter
Copy link
Author

Fix submitted in r318.

Original comment by joel.leitch@gmail.com on 27 Nov 2008 at 12:52

  • Changed state: Fixed

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

No branches or pull requests

1 participant