fix jsontable and use it for Calendar feeds

This commit is contained in:
Doug Bell 2010-07-01 13:11:37 -05:00
parent 6cf68e59a2
commit bbc756c852
4 changed files with 281 additions and 197 deletions

View file

@ -2605,7 +2605,15 @@ sub update {
# set the property
if ($propertyDefinition->{serialize}) {
$setPairs{$property} = JSON->new->canonical->encode($value);
# Only serialize references
if ( ref $value ) {
$setPairs{$property} = JSON->new->canonical->encode($value);
}
# Passing already serialized JSON string
elsif ( $value ) {
$setPairs{$property} = $value;
$value = JSON->new->decode( $value ); # for setting in _properties, below
}
}
else {
$setPairs{$property} = $value;