init project
This commit is contained in:
19
acs/hd/nladmin-test/src/test/java/Test.java
Normal file
19
acs/hd/nladmin-test/src/test/java/Test.java
Normal file
@@ -0,0 +1,19 @@
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("id","1493102834739187714");
|
||||
System.out.println(json.getLong("id"));
|
||||
System.out.println(json.getString("id"));
|
||||
|
||||
HashMap map=new HashMap();
|
||||
map.put("a","1");
|
||||
map.put("b","2");
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(map));
|
||||
System.out.println(jsonObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user