Guest User

Untitled

a guest
May 23rd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. require 'yajl'
  2.  
  3. class String
  4. def to_json
  5. self
  6. end
  7. end
  8.  
  9. x = {'_id' => 1, "name" => 2101}
  10. enc = Yajl::Encoder.encode(x)
  11.  
  12. puts (enc == Yajl::Encoder.encode(enc))
Add Comment
Please, Sign In to add comment