use of com.alibaba.fastjson.serializer.MiscCodec in project fastjson by alibaba.
the class InetAddressDeserializerTest method test_null.
public void test_null() throws Exception {
String input = "null";
DefaultJSONParser parser = new DefaultJSONParser(input, ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
MiscCodec deser = new MiscCodec();
Assert.assertNull(deser.deserialze(parser, null, null));
}
use of com.alibaba.fastjson.serializer.MiscCodec in project fastjson by alibaba.
the class LocaleTest method test_null.
public void test_null() throws Exception {
String input = "null";
DefaultJSONParser parser = new DefaultJSONParser(input, ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
MiscCodec deser = new MiscCodec();
Assert.assertNull(deser.deserialze(parser, null, null));
}
use of com.alibaba.fastjson.serializer.MiscCodec in project fastjson by alibaba.
the class URIDeserializerTest method test_null.
public void test_null() throws Exception {
String input = "null";
DefaultJSONParser parser = new DefaultJSONParser(input, ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
MiscCodec deser = new MiscCodec();
Assert.assertEquals(JSONToken.LITERAL_STRING, deser.getFastMatchToken());
Assert.assertNull(deser.deserialze(parser, null, null));
}
use of com.alibaba.fastjson.serializer.MiscCodec in project fastjson by alibaba.
the class InetAddressDeserializerTest method test_error_0.
public void test_error_0() throws Exception {
String input = "'[&中国-^]'";
DefaultJSONParser parser = new DefaultJSONParser(input, ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
MiscCodec deser = new MiscCodec();
Throwable error = null;
Object value = null;
try {
value = deser.deserialze(parser, null, null);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
Aggregations