struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurizio Cucchiara <maurizio.cucchi...@gmail.com>
Subject Re: JSON plugin suggest : parse String value "" to Number with null / 0
Date Tue, 23 Nov 2010 01:46:02 GMT
I'm not sure understand what you mean, it could be ognl conversion related.
For further details, could you provide the NPE stack?

2010/11/22 Knight Chen <dolt131943@gmail.com>

> Hi all,
>
> I often encounter Number format exception when I use JSON plugin to
> parse input String "" from AJAX request to Number,
> because in Web front,  that will be a zero length String "" transfer
> to backend if the text input has no enter,
> so will encounter the Number format 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 develop.
>
>
> --
> ========================
> Knight Chen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Maurizio Cucchiara

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message