D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
yajl-ruby-1.3.0
/
examples
/
encoding
/
Filename :
one_shot.rb
back
Copy
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..') $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib') require 'yajl' obj = { :a_test => "of encoding in one pass", :which_will => "simply return a string when finished", :as_easy_as => 123 } str = Yajl::Encoder.encode(obj) puts str