RIMARY KEY,
value BLOB,
encoding VARCHAR(1) NOT NULL -- r=raw/binary, j=json
)',
],
};
sub _init {
require DBI;
require SQL::Schema::Versioned;
my
if ($encoding eq 'j') {
require JSON::MaybeXS;
eval { $decoded = JSON::MaybeXS::decode_json($value) };
return [500, "Can't decode JSON value: $@"] if $@;
} elsif ($encodin
sif ($encoding eq 'j') {
require JSON::MaybeXS;
eval { $encoded = JSON::MaybeXS::encode_json($value) };
return [500, "Can't encode JSON value: $@"] if $@;
} else {