Created
July 13, 2010 02:09
-
-
Save frsyuki/473354 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'msgpack' | |
require 'json' | |
File.open(ARGV[0]) do |f| | |
begin | |
MessagePack::Unpacker.new(f).each {|obj| | |
puts obj.to_json | |
} | |
rescue EOFError | |
end | |
end | |
# $ gem install json | |
# $ gem install msgpack | |
# $ ruby ./msgpack2json.rb file.mpac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment