From 35ff40e4b211f1a2622776c71ac67a6ad2a11f7c Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 8 Jul 2008 21:27:15 +0000 Subject: [PATCH] fix JSON encoding problems in Shop/ShipDriver --- lib/WebGUI/Shop/ShipDriver.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Shop/ShipDriver.pm b/lib/WebGUI/Shop/ShipDriver.pm index fe4ae6f6c..aa517a5ca 100644 --- a/lib/WebGUI/Shop/ShipDriver.pm +++ b/lib/WebGUI/Shop/ShipDriver.pm @@ -158,7 +158,7 @@ sub get { $opts = {}; } else { - $opts = JSON::from_json($opts); + $opts = decode_json($opts); } if (defined $param) { return $opts->{$param}; @@ -303,7 +303,7 @@ sub update { my $options = shift || {}; WebGUI::Error::InvalidParam->throw(error => 'update was not sent a hashref of options to store in the database') unless ref $options eq 'HASH' and scalar keys %{ $options }; - my $jsonOptions = to_json($options); + my $jsonOptions = encode_json($options); $options{id $self} = $jsonOptions; $self->session->db->write('update shipper set options=? where shipperId=?', [$jsonOptions, $self->getId]); return undef;