{sa: [{id: :&}]}.to_json => "{\"sa\":[{\"id\":\"\\u0026\"}]}"
现在不想他吧& 转换成\u0026
期望结果
{"sa":[{"id":"&"}]}
请问怎么办?
@rei
http://stackoverflow.com/questions/5123993/json-encoding-wrongly-escaped-rails-3-ruby-1-9-2
ActiveSupport.escape_html_entities_in_json = false
@kungs 谢谢 @lululau 谢谢!