blob: 3502cdb63c0a57840a852927a8af90df9f1f2dbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
module Psych
module Visitors
class JSONTree < YAMLTree
def initialize options = {}, emitter = Psych::JSON::TreeBuilder.new
super
end
def visit_String o
@emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::ANY
end
alias :visit_Symbol :visit_String
end
end
end
|