From 631bade4f6556ac2acf70f4dacaaad8ad5aa0467 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 8 Jul 2008 21:25:33 +0000 Subject: [PATCH] fix the same JSON encoding issues with the Sku Product during upgrades --- docs/upgrades/upgrade_7.4.40-7.5.16.pl | 10 +++++----- docs/upgrades/upgrade_7.5.10-7.5.11.pl | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/upgrades/upgrade_7.4.40-7.5.16.pl b/docs/upgrades/upgrade_7.4.40-7.5.16.pl index 2aae7f874..49e73210f 100644 --- a/docs/upgrades/upgrade_7.4.40-7.5.16.pl +++ b/docs/upgrades/upgrade_7.4.40-7.5.16.pl @@ -1225,7 +1225,7 @@ EOSQL1 while (my $acc = $accessorySth->hashRef()) { push @accessories, $acc; } - my $accJson = to_json(\@accessories); + my $accJson = encode_json(\@accessories); $session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]); ##Related @@ -1234,7 +1234,7 @@ EOSQL1 while (my $acc = $relatedSth->hashRef()) { push @related, $acc; } - my $relJson = to_json(\@related); + my $relJson = encode_json(\@related); $session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]); ##Specification @@ -1243,7 +1243,7 @@ EOSQL1 while (my $spec = $specificationSth->hashRef()) { push @specification, $spec; } - my $specJson = to_json(\@specification); + my $specJson = encode_json(\@specification); $session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]); ##Feature @@ -1252,7 +1252,7 @@ EOSQL1 while (my $feature = $featureSth->hashRef()) { push @features, $feature; } - my $featJson = to_json(\@features); + my $featJson = encode_json(\@features); $session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]); ##Benefit @@ -1261,7 +1261,7 @@ EOSQL1 while (my $benefit = $benefitSth->hashRef()) { push @benefits, $benefit; } - my $beneJson = to_json(\@benefits); + my $beneJson = encode_json(\@benefits); $session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]); } diff --git a/docs/upgrades/upgrade_7.5.10-7.5.11.pl b/docs/upgrades/upgrade_7.5.10-7.5.11.pl index e7894670e..4bc1cd992 100644 --- a/docs/upgrades/upgrade_7.5.10-7.5.11.pl +++ b/docs/upgrades/upgrade_7.5.10-7.5.11.pl @@ -1110,7 +1110,7 @@ EOSQL1 while (my $acc = $accessorySth->hashRef()) { push @accessories, $acc; } - my $accJson = to_json(\@accessories); + my $accJson = encode_json(\@accessories); $session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]); ##Related @@ -1119,7 +1119,7 @@ EOSQL1 while (my $acc = $relatedSth->hashRef()) { push @related, $acc; } - my $relJson = to_json(\@related); + my $relJson = encode_json(\@related); $session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]); ##Specification @@ -1128,7 +1128,7 @@ EOSQL1 while (my $spec = $specificationSth->hashRef()) { push @specification, $spec; } - my $specJson = to_json(\@specification); + my $specJson = encode_json(\@specification); $session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]); ##Feature @@ -1137,7 +1137,7 @@ EOSQL1 while (my $feature = $featureSth->hashRef()) { push @features, $feature; } - my $featJson = to_json(\@features); + my $featJson = encode_json(\@features); $session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]); ##Benefit @@ -1146,7 +1146,7 @@ EOSQL1 while (my $benefit = $benefitSth->hashRef()) { push @benefits, $benefit; } - my $beneJson = to_json(\@benefits); + my $beneJson = encode_json(\@benefits); $session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]); }