jdegoes / blueeyes

A lightweight Web 3.0 framework for Scala, featuring a purely asynchronous architecture, extremely high-performance, massive scalability, high usability, and a functional, composable design.
github.com/jdegoes/blueeyes
738 stars 46 forks source link

Avoid recursively calling toString on nested JValues. #124

Closed non closed 11 years ago

non commented 11 years ago

This commit fixes problems where logging frameworks, the REPL, etc. could create massive strings representing gigantic JSON arrays. After this change, only the top-level class will be printed, e.g.

JArray(<12452 values>)

To generate an actual JSON string, use renderCompact (to minimize the size of JSON produced), renderPretty (for whitespace and indentation), or renderCanonical (like renderPretty but also sorts fields in JObject to assist string equality testing).