Browse files

updating files for 0.5.7 release

  • Loading branch information...
1 parent 8603763 commit 66dbfd5399a7c96e4900fb0975762ab4bc097e85 @brianmario committed Jun 24, 2009
Showing with 16 additions and 4 deletions.
  1. +6 −0
  2. +7 −1 README.rdoc
  3. +1 −1 lib/yajl.rb
  4. +2 −2 yajl-ruby.gemspec
@@ -1,5 +1,11 @@
# Changelog
+## 0.5.7 (June 23rd, 2009)
+* You can now pass parser options (like :symbolize_keys for example) to Yajl::HttpStream.get
+* Refactored spec tests a bit, DRYing up the Yajl::HttpStream specs quite a bit.
+* Added a spec rake task, and spec.opts file
+* Updated and renamed rcov rake task, and added rcov.opts file
## 0.5.6 (June 19th, 2009)
* Added JSON.default_options hash to the JSON gem compatibility API
* Split out the JSON gem compatibility API's parsing and encoding methods into individually includable files
@@ -102,12 +102,16 @@ Since yajl-ruby parses JSON as a stream, supporting API's like Twitter's Streami
You can simply supply a block to Yajl::HttpStream.get, which is used as the callback for when a JSON object has been
unserialized off the stream. For the case of this Twitter Streaming API call, the callback gets fired a few times a second (depending on your connection speed).
The code below is all that's needed to make the request and stream unserialized Ruby hashes off the response, continuously.
+You'll note that I've enabled the :symbolize_keys parser option as well. Doing so is much more efficient for parsing JSON streams with
+lots of repetitive keys - for things like result sets or multiple API requests - than the same parse with string keys.
+This is because Ruby will reuse (and never GC) it's symbol table. Be that as it may, if you want to parse JSON strings with random key names
+it's much better to leave string keys enabled (the default), so they can get GC'd later.
require 'uri'
require 'yajl/http_stream'
uri = URI.parse("http://#{username}:#{password}")
- Yajl::HttpStream.get(uri) do |hash|
+ Yajl::HttpStream.get(uri, :symbolize_keys => true) do |hash|
puts hash.inspect
@@ -252,6 +256,8 @@ This project includes code from the BSD licensed yajl project, copyright 2007-20
== Special Thanks
+For those of you using yajl-ruby out in the wild, please hit me up on Twitter (brianmario) or send me a message here on the Githubs describing the site and how you're using it. I'd love to get a list going!
I've had a lot of inspiration, and a lot of help. Thanks to everyone who's been a part of this and those to come!
* Lloyd Hilaiel - - for writing Yajl!!
@@ -13,7 +13,7 @@
# Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.
module Yajl
- VERSION = "0.5.6"
+ VERSION = "0.5.7"
class Parser
# A helper method for parse-and-forget use-cases
@@ -2,11 +2,11 @@ do |s| = %q{yajl-ruby}
- s.version = "0.5.6"
+ s.version = "0.5.7"
s.required_rubygems_version =">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
- = %q{2009-06-22}
+ = %q{2009-06-23} = %q{}
s.extensions = ["ext/extconf.rb"]
s.extra_rdoc_files = [

0 comments on commit 66dbfd5

Please sign in to comment.