Skip Menu |

This queue is for tickets about the Data-Clean-JSON CPAN distribution.

Report information
The Basics
Id: 78771
Status: resolved
Priority: 0/
Queue: Data-Clean-JSON

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: dealing with circular data structures
Data::Clean::JSON goes into an endless loop when faced with circular data structures. JSON can't serialise circular data structures, so in an ideal world detecting, and possibly unpicking such structures seems like a good ability for Data::Clean::JSON to have.
Subject: dcj-cycles.t
use Test::More tests => 1; use Data::Clean::JSON; my $array = [1, 2, 3]; my $data = { array => $array }; push @$array, $data; Data::Clean::JSON::->new->clone_and_clean($data); ok 1;
On Fri Aug 03 15:43:18 2012, TOBYINK wrote: Show quoted text
> Data::Clean::JSON goes into an endless loop when faced with circular
data Show quoted text
> structures. > > JSON can't serialise circular data structures, so in an ideal world > detecting, and possibly unpicking such structures seems like a good > ability for Data::Clean::JSON to have.
Yep, this is another common use-case. Implemented in 0.04+. Regards, Steven