Sha256: 13e98fe994ea6fbd1bb7f33e0c4331328a82777fbeafea148f47b3cf488051a5

Contents?: true

Size: 643 Bytes

Versions: 27

Compression:

Stored size: 643 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

# Ubuntu does not accept arguments to ruby when called using env. To get warnings to show up the -w options is
# required. That can be set in the RUBYOPT environment variable.
# export RUBYOPT=-w

$VERBOSE = true

$: << File.join(File.dirname(__FILE__), "../lib")
$: << File.join(File.dirname(__FILE__), "../ext")

require 'oj'

reltypes={}
Oj::Doc.open_file('foo.json') do |doc|
  doc.each_child do |target|
    puts "#{target.local_key} is #{target.local_key.class}"
    target.each_leaf do |score|
      reltype=score.local_key
      reltypes[reltype] = (reltypes[reltype] || 0) + 1
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
oj-2.8.0 test/foo.rb
oj-2.7.2 test/foo.rb
oj-2.7.1 test/foo.rb
oj-2.7.0 test/foo.rb
oj-2.6.1 test/foo.rb
oj-2.6.0 test/foo.rb
oj-2.5.5 test/foo.rb
oj-2.5.4 test/foo.rb
oj-2.5.3 test/foo.rb
oj-2.5.2 test/foo.rb
oj-2.5.1 test/foo.rb
oj-2.4.3 test/foo.rb
oj-2.4.2 test/foo.rb
oj-2.4.1 test/foo.rb
oj-2.4.0 test/foo.rb
oj-2.3.0 test/foo.rb
oj-2.2.3 test/foo.rb
oj-2.2.2 test/foo.rb
oj-2.2.1 test/foo.rb
oj-2.2.0 test/foo.rb