guyboertje/jrjackson — pull request #6 by hollow (2013-07-13 16:33:45+00:00)
Title: Replace custom encoding logic with as_json

In case of Strings the old method fails to escape nested (preescaped)
quotes, e.g.:

"CoffeeScript.compile.apply(this, [\"localStorage.setItem...\")"

was wrongly encoded as:

"\"CoffeeScript.compile.apply(this, [\"localStorage.setItem...\"])\""

Using the raw generator, we get the following result:

"\"CoffeeScript.compile.apply(this, [\\\"localStorage.setItem...\\\"])\""

The same applies to nil, true, false and the to_json/to_s fallback.

To simplify the encoding logic this commit uses the as_json convention
and relies on JrJackson::Raw to produce the correct output.