Create a encodeForJSON() function
jmanico opened this issue · 6 comments
jmanico commented
We should create a function to safely embed JSON on a webpage simular to to what https://github.com/yahoo/serialize-javascript accomplishes.
melloware commented
This would be a great feature as we have needed something similar in the past.
Infernalbronco commented
Can I try this?
jmanico commented
Infernalbronco commented
@jmanico Can u give any pointers from where I can start studying for this?
jmanico commented
Maybe this will point you in the right direction?
or
https://github.com/yahoo/serialize-javascript
?
jeremylong commented
Wouldn't Encode.forJavaScriptSource()
work? You would just be responsible for quoting the output.