123456789101112131415161718192021222324252627282930313233 |
- package jsontest;
- import org.json.JSONObject;
- public class Test{
-
- private int aze;
- private String rty;
-
- public Test(){
- this.aze = 8;
- this.rty = "Bjr";
- }
- public int getAze() {
- return aze;
- }
- public String getRty() {
- return rty;
- }
-
- public String toString(){
- JSONObject jo = new JSONObject(this);
- return jo.toString();
- }
-
- public JSONObject toJson(){
- return new JSONObject(this);
- }
-
- }
-
|