use of com.alibaba.fastjson.JSONObject in project fastjson by alibaba.
the class Bug_for_agapple_2 method test_bug.
public void test_bug() throws Exception {
DbMediaSource obj = new DbMediaSource();
obj.setType(DataMediaType.ORACLE);
JSONObject json = (JSONObject) JSON.toJSON(obj);
Assert.assertEquals("ORACLE", json.get("type"));
}
use of com.alibaba.fastjson.JSONObject in project fastjson by alibaba.
the class SlashTest method test_0.
public void test_0() throws Exception {
String text = "{\"errorMessage\":\"resource '/rpc/hello/none.json' is not found !\"}";
JSONObject json = (JSONObject) JSON.parse(text);
Assert.assertEquals("{\"errorMessage\":\"resource '/rpc/hello/none.json' is not found !\"}", json.toString());
}
use of com.alibaba.fastjson.JSONObject in project fastjson by alibaba.
the class Bug_for_zhongyin method test_map.
public void test_map() throws Exception {
for (char c = '