johnthethird
3/2/2010 - 7:35 PM

ripple_json_handling.rb

client = Riak::Client.new()
bucket = client.bucket('MyBucket')
my_json_obj = bucket.get('MyKey')

my_json_obj.content_type  #=>  "application/json"
my_json_obj.data.to_json  #=>  {"name":=>"Joe"}
my_json_obj.data.to_s     #=>  nameJoe

Should RObject.data.to_s be aliased to .to_json when we know the content_type is json?