struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Json Plugin & Enum type
Date Tue, 20 Dec 2011 16:37:43 GMT
But some people use `toString()` as a generic "let's make this
human-readable" method, so it could return essentially anything. I mean,
it'd be escaped, so legal JSON, but I'm not sure that's what would be

I'm wary.


On Tue, Dec 20, 2011 at 11:23 AM, Maurizio Cucchiara

> Hi all,
> while I was trying to jsonify an enum, I realized that the json writer uses
> the value of the name property in order to serialize an enum (see
> - row 286).
> Although it looks like there was a general consensus on the use the name
> properties (see, this looks wrong to me, since
> name properties is final and there is no way to overwrite it.
> The json writer should use instead toString method (which uses name by
> default), such that the user can "customize" the value.
> Twitter     :
> G+          :
> Linkedin    :
> Maurizio Cucchiara

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