mirror of
https://github.com/stleary/JSON-java.git
synced 2026-05-21 00:00:47 -04:00
new test cases to support bean annotation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package org.json.junit.data;
|
||||
|
||||
import org.json.JSONPropertyName;
|
||||
|
||||
/**
|
||||
* Test bean for the {@link JSONPropertyName} annotation.
|
||||
*/
|
||||
public class MyBeanCustomName implements MyBeanCustomNameInterface {
|
||||
public int getSomeInt() { return 42; }
|
||||
@JSONPropertyName("")
|
||||
public long getSomeLong() { return 42L; }
|
||||
@JSONPropertyName("myStringField")
|
||||
public String getSomeString() { return "someStringValue"; }
|
||||
@JSONPropertyName("Some Weird NAme that Normally Wouldn't be possible!")
|
||||
public double getMyDouble() { return 0.0d; }
|
||||
@Override
|
||||
public float getSomeFloat() { return 2.0f; }
|
||||
@Override
|
||||
public int getIgnoredInt() { return 40; }
|
||||
}
|
||||
Reference in New Issue
Block a user