I'm including JSON in an HTML tag, considering the only possible input characters for the JSON will be "':{},[a-z][0-9] is it possible for JSON or HTML to be broken with my approach? What should I be wary of when using JSON across HTML and Javascript?
<input type="hidden" value="<?=htmlspecialchars(json_encode($myArray));?>" />
<,>,&(and"and'if used in HTML attributes).