PHP 8.2.31
Preview: json_tree.rb Size: 436 B
/proc/thread-self/root/opt/alt/ruby20/lib64/ruby/2.0.0/psych/visitors/json_tree.rb

require 'psych/json/ruby_events'

module Psych
  module Visitors
    class JSONTree < YAMLTree
      include Psych::JSON::RubyEvents

      def initialize options = {}, emitter = Psych::JSON::TreeBuilder.new
        super
      end

      def accept target
        if target.respond_to?(:encode_with)
          dump_coder target
        else
          send(@dispatch_cache[target.class], target)
        end
      end
    end
  end
end

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
596 B lrw-r--r-- 2023-07-26 14:09:00
Edit Download
1.42 KB lrw-r--r-- 2023-07-26 14:09:00
Edit Download
436 B lrw-r--r-- 2023-07-26 14:09:00
Edit Download
9.44 KB lrw-r--r-- 2023-07-26 14:09:00
Edit Download
329 B lrw-r--r-- 2023-07-26 14:09:00
Edit Download
13.52 KB lrw-r--r-- 2023-07-26 14:09:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).