Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1736 from lift/json-js-escaping
Until now, we've had a hardcoded set of characters that would always be escaped in JSON; these were never modifiable. We now plug in to the new RenderSettings case class to add the ability to specify sets of characters that should be escaped. Additionally, we add a default set of such characters that corresponds to the characters that must be escaped when JSON is evaluated directly by a JavaScript engine rather than by a valid JSON parser (as when using JSON-P). Lastly, we provide two default RenderSettings instances, prettyJs and compactJs, that encapsulate the appropriate escaping with pretty or compact rendering.
- Loading branch information
Showing
2 changed files
with
104 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters