http://qs321.pair.com?node_id=1168535


in reply to Re: perl dancer route template hashref pass complex json file to server issue
in thread perl dancer route template hashref pass complex json file to server issue

Hi , I will explain more with code example in my perl dancer code I have route
use Dancer ':syntax'; our $VERSION = '0.1'; get '/PopUp' => sub { my $jsonFile={jj =>"{"name":"jsonFileexample","problem":"thisIsThrProb +lem\"withComma"}"} template 'PopUp' ,{'sendfileToserver'=>$jsonFile}; };
in the server side I have the route that receive the perl dancer paramemters
<script> var customjsonList ="<%customCommands%>"; alert(customjsonList.children.length) var output=customjsonList .split(","); alert(output) </script>
so here in javascript I had the error , that some thing is wrong with the json file when I look at the error I saw that json file is missing the \
{"name":"jsonFileexample","problem":"thisIsThrProblem"withComma"}" }
I have perl dancer "Dancer 1.3202" thanks Rami D.