Fix JSON encode/decode for DB usage
Fix JSON encode/decode for DB usage

the column we use in the DB is a UTF8 column so we need the encoded JSON to
have the utf8 flag set in the SV, otherise an upgrade happens during save
to the DB.

encode_json encodes to utf8, but the result will not have the utf8 flag set,
causing double encoding to happen.

JSON::XS->new->encode will encode to utf8 and set the utf8 flag if the
is utf8 data in the encoding. avoiding the double encode

decode_json expects utf8 bytes, and will croak if given a scaler
with the utf8 flag on, which is the case with data from the DB.

JSON::XS->new->decode will correctly decode the scalar with or without
the utf8 flag set.

alcy/perlweb,briandfoy/perlweb,PeterMartini/perlweb,Abigail/perlweb,alcy/perlweb,Abigail/perlweb,autarch/perlweb,dagolden/perlweb,ajolma/perlweb,alcy/perlweb,bjakubski/perlweb,briandfoy/perlweb,briandfoy/perlweb,ajolma/perlweb,autarch/perlweb,dagolden/perlweb,PeterMartini/perlweb,dagolden/perlweb,autarch/perlweb,bjakubski/perlweb,Abigail/perlweb,bjakubski/perlweb,ajolma/perlweb,PeterMartini/perlweb