Item13438: error while encoding object to json
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
For some reason the encoder will have to json-encode a
Foswiki::Attr
which is a blessed object without a TO_JSON method. As
allow_blessed
is not set an exception is thrown.
--- a/lib/Foswiki/Plugins/EditRowPlugin/TableCell.pm
+++ b/lib/Foswiki/Plugins/EditRowPlugin/TableCell.pm
@@ -47,7 +47,7 @@ sub render {
my ( $this, $opts, $render_opts ) = @_;
my $colDef = $opts->{col_defs}->[ $this->{number} ] || $defCol;
- my $json = JSON->new()->convert_blessed();
+ my $json = JSON->new()->convert_blessed->allow_blessed();
--
MichaelDaum - 29 May 2015