exception for input String "".
I check the JSONPopulator, that has process the null value to 0 when
parse to Number type, but not process the String "",
So can JSONPopulator to support process String "" to null or 0,that
will be easier web front d
be ognl conversion related.
> For further details, could you provide the NPE stack?
>
> 2010/11/22 Knight Chen
>
>> Hi all,
>>
>> I often encounter Number format exception when I use JSON plugin to
>> parse input String "" from AJAX request to Number,
one know why convert method process is driven by value and type
> instead of target type only?
>
> 2010/11/23 Knight Chen
>
>> Hi All,
>> Thanks for reply, and sorry for my poor English.
>>
>> In this case:
>>
>> I have a POJO:
>> public class
;
>
> private Object convertPrimitive(Class clazz, Object value, Method method)
> throws JSONException {
> if (value == null) {
> if (Short.TYPE.equals(clazz) || Short.class.equals(clazz))
> return (short) 0;
> ...
> } e
4 matches
Mail list logo