Replaced all decode/encode_json method calls with to/from_json method
calls now that we've licked the Survey encoding bug (wrong mysql db field type)
This commit is contained in:
parent
c4eb4e3b57
commit
a1033aeaa2
3 changed files with 9 additions and 12 deletions
|
|
@ -87,7 +87,7 @@ sub new {
|
|||
|
||||
# Load json object if given..
|
||||
if ($json) {
|
||||
my $decoded_json = decode_json($json);
|
||||
my $decoded_json = from_json($json);
|
||||
$self->{sections} = $decoded_json->{sections} if defined $decoded_json->{sections};
|
||||
$self->{survey} = $decoded_json->{survey} if defined $decoded_json->{survey};
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ components of this object.
|
|||
|
||||
sub freeze {
|
||||
my $self = shift;
|
||||
return encode_json(
|
||||
return to_json(
|
||||
{ sections => $self->{sections},
|
||||
survey => $self->{survey},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue