#!/usr/local/bin/ruby # coding: utf-8 require 'net/http' require 'uri' require 'json' =begin url = "http://weather.livedoor.com/forecast/webservice/json/v1?city=130010" uri = URI.parse(url) json = Net::HTTP.get(uri) result = JSON.parse(json) puts result =end str = "/u5343/" str.gsub!(/\\u([0-9a-f]{4})/) { [$1.hex].pack("U") }