To set the \uXXXX codes back to utf-8:
json_string.gsub!(/\\u([0-9a-z]{4})/) {|s| [$1.to_i(16)].pack("U")}
More Related Contents:
- How do I parse JSON with Ruby on Rails? [duplicate]
- How to “pretty” format JSON output in Ruby on Rails
- In Rails, how do you render JSON using a view?
- How to convert a ruby hash object to JSON?
- POST json to rails server
- Encoding Ruby on Rails code?
- String.force_encoding() in Ruby 1.8.7 (or Rails 2.x)
- In Ruby on Rails, are ‘#encoding: utf-8’ and ‘config.encoding = “utf-8″‘ different?
- Can you Distribute a Ruby on Rails Application without Source?
- Rails Object Relationships and JSON Rendering
- Rails :dependent => :destroy VS :dependent => :delete_all
- difference between collection route and member route in ruby on rails?
- Disable ActiveRecord for Rails 4
- Rails model without database
- Using Rails serialize to save hash to database
- Rails 3: Get Random Record
- Heroku upload-Precompiling assets failed
- What tools do you recommend to profile Rails apps? [closed]
- How do I use RVM and create globally available gems?
- Undefined Method attr_accessible
- How to avoid NoMethodError for nil elements when accessing nested hashes? [duplicate]
- How to save a base64 string as an image using ruby
- delete_all vs destroy_all?
- Best practices to handle routes for STI subclasses in rails
- NoMethodError when trying to invoke helper method from Rails controller
- Why can’t I install the SQLite gem?
- Ruby on Rails 3 howto make ‘OR’ condition
- Adding foreign key to a rails model
- RVM installed by Ruby not working?
- using has_many :through and build