1module Psych 2 module JSON 3 module YAMLEvents # :nodoc: 4 def start_document version, tag_directives, implicit 5 super(version, tag_directives, !streaming?) 6 end 7 8 def end_document implicit_end = !streaming? 9 super(implicit_end) 10 end 11 12 def start_mapping anchor, tag, implicit, style 13 super(anchor, nil, true, Nodes::Mapping::FLOW) 14 end 15 16 def start_sequence anchor, tag, implicit, style 17 super(anchor, nil, true, Nodes::Sequence::FLOW) 18 end 19 20 def scalar value, anchor, tag, plain, quoted, style 21 if "tag:yaml.org,2002:null" == tag 22 super('null', nil, nil, true, false, Nodes::Scalar::PLAIN) 23 else 24 super 25 end 26 end 27 end 28 end 29end 30