Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
There seems to be an error in json_common.rb, which we found out due to a bug in the ActiveSupport::JSON module.
ActiveSupport::JSON does not encode 16+ bits characters, but chops them off – as we found out the other day.
The point is that in json_common.rb on line 7, the library uses JSON.parse, but on line 11, the .to_json uses ActiveSupport::JSON, which is another library that contains that bug.
Shouldn't the library use JSON.generate here?
AFAICS this is still the case with the most recent version of
But if I'm not mistaken, a patch has landed in Rails since late 2013, which provides compatibility between ActiveSupport::JSON and pure JSON (see rails/rails#12862 for details). It's included since
So if it is fine to no longer support