--- trunk/vhost/webpac2.cgi 2009/07/12 18:18:57 1242 +++ trunk/vhost/webpac2.cgi 2009/07/24 09:14:29 1248 @@ -282,9 +282,14 @@ while ( my $result = $swish_results->next_result ) { - my $data = from_json( $result->property('data'), {utf8 => 1} ); - + my $data = $result->property('data'); dump_yaml( 'data', $data ); + # FIXME if we produce valid json we shouldn't need eval here! + eval { $data = from_json( $data, {utf8 => 1} ); }; + if ( $@ ) { + warn "ERROR: $@ from ",dump( $data ); + next; + } my $li_class = ''; $li_class = qq| class="z"| if $nr % 2 == 0;