to_json(o)
Dump Ruby object o to a JSON string.
# File ext/psych/lib/psych.rb, line 209 def self.to_json o visitor = Psych::Visitors::JSONTree.new visitor << o visitor.tree.yaml end