when generate json from ruby object, "ascii_only" not work, why???
when I encode some hash to json on rails 4, I found the method encode json is change.
so I generate json, by call JSON.generate(object, :ascii_only => true), but when object is an class instance it not work.
more info please check testjson
Apparently rails4 breaks this by first overwriting the methods JSON gem set up to generate JSON and then not passing along any of the original options into their encoder classes and consequently to JSON gem's generation code after they call it from the new methods. I mean who needs these options anyway, am I rite?
Yes, I want these options still work so that can have same result from exec JSON.generate(hash_object, :ascii_only => true).
additional, could you show me how rails4(activesupport) breaks this by first overwriting the methods JSON gem set up to generate JSON and then not passing along any of the original options into their encoder classes and consequently to JSON gem's generation code after they call it from the new methods. ??