discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
Fix submitted in r318.

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