package myapp; use Dancer ':syntax'; use File::Slurp qw(read_file write_file read_dir); #use db; use JSON; use Data::Dump qw/ pp /; use DBI; our $VERSION = '0.1'; use Dancer::Plugin::Database; get '/test' => sub { my $jsonobj; $jsonobj='[{"name":"test","problem":"here is the problem \" comma "}]'; debug $jsonobj; template 'test',{passtoserver=> $jsonobj}; };