use of com.alibaba.fastjson.JSONReader in project fastjson by alibaba.
the class ListStringFieldTest_stream_array method test_error_nu.
public void test_error_nu() throws Exception {
String text = "[nu";
JSONReader reader = new JSONReader(new StringReader(text));
Exception error = null;
try {
reader.readObject(Model.class);
reader.close();
} catch (JSONException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.JSONReader in project fastjson by alibaba.
the class ListStringFieldTest_stream_array method test_error.
public void test_error() throws Exception {
String text = "[[1{1,}";
JSONReader reader = new JSONReader(new StringReader(text));
Exception error = null;
try {
reader.readObject(Model.class);
reader.close();
} catch (JSONException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.JSONReader in project fastjson by alibaba.
the class ListStringFieldTest_stream_array method test_null.
public void test_null() throws Exception {
String text = "[null]";
JSONReader reader = new JSONReader(new StringReader(text));
Model model = reader.readObject(Model.class);
Assert.assertNull(model.values);
}
use of com.alibaba.fastjson.JSONReader in project fastjson by alibaba.
the class ListStringFieldTest_stream_array method test_error_fnu.
public void test_error_fnu() throws Exception {
String text = "[[nu";
JSONReader reader = new JSONReader(new StringReader(text));
Exception error = null;
try {
reader.readObject(Model.class);
reader.close();
} catch (JSONException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.JSONReader in project fastjson by alibaba.
the class ListStringFieldTest_stream_array method test_error_fnul.
public void test_error_fnul() throws Exception {
String text = "[[nul";
JSONReader reader = new JSONReader(new StringReader(text));
Exception error = null;
try {
reader.readObject(Model.class);
reader.close();
} catch (JSONException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
Aggregations