Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created July 13, 2010 02:09
Show Gist options
  • Save frsyuki/473354 to your computer and use it in GitHub Desktop.
Save frsyuki/473354 to your computer and use it in GitHub Desktop.
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