Created
January 27, 2017 13:39
-
-
Save mox601/daebeda4f59dad7240f07125c18cc37d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void test() { | |
JSONObject root = new JSONObject("{}"); | |
List<TestC> list = new ArrayList<>(); | |
TestC testC = new TestC("type", "bucket", "code", null, DateTime.now(), | |
null); | |
TestC testC1 = new TestC("type", "bucket", "code", null, DateTime.now(), | |
null); | |
root.put("1", testC); | |
list.add(testC); | |
list.add(testC1); | |
root.put("2", list); | |
} | |
private static class TestC { | |
private final String type; | |
private final String bucket; | |
private final String code; | |
private final Object o; | |
private final DateTime now; | |
private final Object o1; | |
public TestC(String type, String bucket, String code, Object o, DateTime now, Object o1) { | |
this.type = type; | |
this.bucket = bucket; | |
this.code = code; | |
this.o = o; | |
this.now = now; | |
this.o1 = o1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment