Sha256: b9873fe3606100203337057a3c502c4f2f581c87b0a7d323c48669f115278d78

Contents?: true

Size: 672 Bytes

Versions: 25

Compression:

Stored size: 672 Bytes

Contents

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

$: << File.dirname(__FILE__)

require 'helper'

require 'zlib'

File.open('test.json.gz', 'r') do |file|
  Zlib::GzipReader.wrap(file) do |f2|
    puts "*** f2: #{f2}"
    Oj.load(f2) do |val|
      puts val
    end
  end
end

=begin
And a json file with the following contents (then gzipped):

{"a":2}
{"b":2}
The output is:

{"a"=>2}
{"b"=>2}
bin/test:8:in `load': undefined method `new' for #<EOFError: end of file reached> (NoMethodError)
    from bin/test:8:in `block (2 levels) in <main>'
    from bin/test:7:in `wrap'
    from bin/test:7:in `block in <main>'
    from bin/test:6:in `open'
    from bin/test:6:in `<main>'
=end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
oj-2.13.1 test/zip.rb
oj-2.13.0 test/zip.rb
oj-2.12.14 test/zip.rb
oj-2.12.13 test/zip.rb
oj-2.12.12 test/zip.rb
oj-2.12.10 test/zip.rb
oj-2.12.8 test/zip.rb
oj-2.12.7 test/zip.rb
oj-2.12.5 test/zip.rb
oj-2.12.4 test/zip.rb
oj-2.12.3 test/zip.rb
oj-2.12.2 test/zip.rb
oj-2.12.0 test/zip.rb
oj-2.11.3 test/zip.rb
oj-2.11.2 test/zip.rb
oj-2.11.1 test/zip.rb
oj-2.11.0 test/zip.rb
oj-2.10.3 test/zip.rb
oj-2.10.2 test/zip.rb
oj-2.10.1 test/zip.rb