forked from fanruan/finekit
zjz1993
5 years ago
3 changed files with 30 additions and 5 deletions
@ -1,14 +1,14 @@
|
||||
package com.fanruan.api.err; |
||||
|
||||
/* |
||||
* 定义json的异常 |
||||
* */ |
||||
/** |
||||
* 用来定义和JSON相关的异常 |
||||
* */ |
||||
public class JSONException extends com.fr.json.JSONException{ |
||||
public JSONException(String message) { |
||||
super(message); |
||||
} |
||||
|
||||
public JSONException(Throwable var1) { |
||||
super(var1); |
||||
public JSONException(Throwable error) { |
||||
super(error); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fanruan.api.json; |
||||
import com.fanruan.api.util.ArrayKit; |
||||
import com.fr.json.JSONObject; |
||||
|
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
public class JSONKitTest { |
||||
@Test |
||||
public void create() throws Exception{ |
||||
Assert.assertEquals(JSONKit.create(), new JSONObject()); |
||||
Assert.assertEquals(JSONKit.create("{test:123}"), new JSONObject("{test:123}")); |
||||
|
||||
} |
||||
} |
Loading…
Reference in new issue