Search in sources :

Example 1 with NumberDeserializer

use of com.alibaba.fastjson.parser.deserializer.NumberDeserializer in project fastjson by alibaba.

the class TestNull method test_short.

public void test_short() throws Exception {
    DefaultJSONParser parser = new DefaultJSONParser("null", ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
    Assert.assertNull(new NumberDeserializer().deserialze(parser, null, null));
}
Also used : NumberDeserializer(com.alibaba.fastjson.parser.deserializer.NumberDeserializer) DefaultJSONParser(com.alibaba.fastjson.parser.DefaultJSONParser)

Example 2 with NumberDeserializer

use of com.alibaba.fastjson.parser.deserializer.NumberDeserializer in project fastjson by alibaba.

the class TestNull method test_null.

public void test_null() throws Exception {
    DefaultJSONParser parser = new DefaultJSONParser("null", ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
    Assert.assertNull(new NumberDeserializer().deserialze(parser, null, null));
}
Also used : NumberDeserializer(com.alibaba.fastjson.parser.deserializer.NumberDeserializer) DefaultJSONParser(com.alibaba.fastjson.parser.DefaultJSONParser)

Example 3 with NumberDeserializer

use of com.alibaba.fastjson.parser.deserializer.NumberDeserializer in project fastjson by alibaba.

the class TestNull method test_byte.

public void test_byte() throws Exception {
    DefaultJSONParser parser = new DefaultJSONParser("null", ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
    Assert.assertNull(new NumberDeserializer().deserialze(parser, null, null));
}
Also used : NumberDeserializer(com.alibaba.fastjson.parser.deserializer.NumberDeserializer) DefaultJSONParser(com.alibaba.fastjson.parser.DefaultJSONParser)

Aggregations

DefaultJSONParser (com.alibaba.fastjson.parser.DefaultJSONParser)3 NumberDeserializer (com.alibaba.fastjson.parser.deserializer.NumberDeserializer)3