Permalink
Browse files

updating gemspec and readme for 0.5.2 release

  • Loading branch information...
1 parent 95c1be2 commit f847de8d616c237a1c91547752b32f3dbaada291 @brianmario committed May 30, 2009
Showing with 14 additions and 5 deletions.
  1. +10 −0 README.rdoc
  2. +4 −5 yajl-ruby.gemspec
View
@@ -123,6 +123,16 @@ Or what if you wanted to compress the stream over the wire?
hash = {:foo => 12425125, :bar => "some string", ... }
Yajl::Gzip::StreamWriter.encode(hash, socket)
+Or what about encoding multiple objects to JSON over the same stream?
+This example will encode and send 50 JSON objects over the same stream, continuously.
+
+ socket = TCPSocket.new(192.168.1.101, 9000)
+ encoder = Yajl::Encoder.new
+ 50.times do
+ hash = {:current_time => Time.now.to_f, :foo => 12425125}
+ encoder.encode(hash, socket)
+ end
+
You can also use Yajl::Bzip2::StreamWriter and Yajl::Deflate::StreamWriter. So you can pick whichever fits your CPU/bandwidth sweet-spot.
There are a lot more possibilities, some of which I'm going to write other gems/plugins for.
View
@@ -2,20 +2,19 @@
Gem::Specification.new do |s|
s.name = %q{yajl-ruby}
- s.version = "0.5.1"
+ s.version = "0.5.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
- s.date = %q{2009-05-25}
+ s.date = %q{2009-05-30}
s.email = %q{seniorlopez@gmail.com}
s.extensions = ["ext/extconf.rb"]
s.extra_rdoc_files = [
- "CHANGELOG.rdoc",
- "README.rdoc"
+ "README.rdoc"
]
s.files = [
".gitignore",
- "CHANGELOG.rdoc",
+ "CHANGELOG.md",
"MIT-LICENSE",
"README.rdoc",
"Rakefile",

0 comments on commit f847de8

Please sign in to comment.