FasterXML/jackson-core — pull request #136 by malaporte (2014-03-22 15:05:10+00:00)
Title: Add Feature for generating JSONP compliant output

I recently got bitten by the fact that JSON in some (rare) cases cannot be parsed directly as JavaScript, typically when using JSONP to perform cross domain requests. Since I found no straightforward option to have Jackson generate JSON escaped in a way that would also work for JSONP, I've added a Feature that, when enabled, causes some special CharacterEscapes to be used to escape the Unicode newline characters \u2028 and \u2029. The output remains perfectly valid and equivalent JSON.

I tried to code that in a way that seems to agree with how the lib is built; do not hesitate to ask if you'd prefer it to be done differently (or none at all).