Skip Menu |
 

This queue is for tickets about the MooseX-Storage CPAN distribution.

Report information
The Basics
Id: 104297
Status: open
Priority: 0/
Queue: MooseX-Storage

People
Owner: Nobody in particular
Requestors: spudsoup [...] cpan.org
Cc: jpope [...] 12engines.com
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.47
Fixed in: (no value)



CC: jpope [...] 12engines.com
Subject: Trait to omit undef fields from serialisation
Download (untitled) / with headers
text/plain 535b
Hello I have discovered that the latest version of MooseX::Storage breaks my application, because it now serializes undef fields to JSON as null, when before it omitted those fields. The change was introduced in version 0.47, via github PR#6 by cowholio4 (cc'd) I realize that the new behaviour is more correct, so it would be unreasonable of me to request a revert, but would it be possible to request a new trait on the dist that provides the old behaviour, that is any fields that are undef are omitted from the generated JSON.
RT-Send-CC: jpope [...] 12engines.com
Download (untitled) / with headers
text/plain 405b
On 2015-05-07 07:39:51, SPUDSOUP wrote: Show quoted text
> I realize that the new behaviour is more correct, so it would be > unreasonable of me to request a revert, but would it be possible to > request a new trait on the dist that provides the old behaviour, that > is any fields that are undef are omitted from the generated JSON.
I wonder if adding MooseX::UndefTolerant to your serializable classes would help here?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.