I have set of values coming from server side where iam trying to generate
JSON and use it in my code
here is the statement now the problem is it is working perfectly
if the value is fine with out single quotes and double quotes.
var stds = jQuery.parseJSON('<?php echo json_encode($this->emps); ?>');
CASE 1:
ABC:"E" DTSM
VCD:"E" DMST
CASE 2:
*****
ABC:E DTSM
VCD:E DMST
How can i still generate the JSON with case 1. iam getting JS error “exception thrown and not caught”. This is due to malformed JSON string
Because JSON is already a valid fragment of JavaScript, you could simply write