pascallouisperez / jsonmarshaller

JsonMarshaller is a Java 1.5 library that allows marshalling and unmarshalling of JSON objects to and from entities ("Java classes").
Apache License 2.0
1 stars 0 forks source link

Can't create an @Value for getter for the same name as an ivar @Value #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This:
 @com.twolattes.json.Entity
 static public class Foo {
   @Value(name="bar") int foo;
   @Value int getFoo() { return foo; }
 }

 @Test
 public void testMarshaller() {
   Foo foo = new Foo();
   foo.foo = 42;
   JSONObject o = Marshaller.create(Foo.class).marshall(foo);      
 }

will throw:
java.lang.IllegalArgumentException: Value with name foo is described
multiple times.

Original issue reported on code.google.com by dmmo...@gmail.com on 8 Aug 2008 at 4:45

GoogleCodeExporter commented 9 years ago
Patch by Ken Drori http://code.google.com/p/jsonmarshaller/source/detail?r=74

Original comment by pascallo...@gmail.com on 1 Mar 2009 at 6:03