Sha256: 357ed5bba9bb4a81149bc1db42f4ce98f078d3d94fafa0ad9f1a5acc4f7813ff

Contents?: true

Size: 871 Bytes

Versions: 34

Compression:

Stored size: 871 Bytes

Contents

#!/usr/bin/env ruby

$: << File.dirname(__FILE__)
$oj_dir = File.dirname(File.expand_path(File.dirname(__FILE__)))
%w(lib ext).each do |dir|
  $: << File.join($oj_dir, dir)
end

require 'active_support'
require "active_support/json"

$s = "\u2014 & \n \u{1F618}"

=begin
def check(label)
  puts "\n--- #{label} --------------------"

  ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
  puts "with standard_json == true: t.to_json - #{$t.to_json}"
  ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
  puts "with standard_json == false: t.to_json - #{$t.to_json}"
end

check('Before Oj')
=end

require 'oj'

ActiveSupport::JSON::Encoding.escape_html_entities_in_json = false
puts "ActiveSupport.encode(s) - #{ActiveSupport::JSON.encode($s)}"

Oj.optimize_rails
Oj.default_options = { mode: :rails }

puts "Oj.dump(s) - #{Oj.dump($s)}"

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/oj-3.13.2/test/bar.rb
oj-3.13.5 test/bar.rb
oj-3.13.3 test/bar.rb
oj-3.13.2 test/bar.rb
oj-3.13.1 test/bar.rb
oj-3.13.0 test/bar.rb
oj-3.12.3 test/bar.rb
oj-3.12.2 test/bar.rb
oj-3.12.1 test/bar.rb
oj-3.12.0 test/bar.rb
oj-3.11.8 test/bar.rb
oj-3.11.7 test/bar.rb
oj-3.11.6 test/bar.rb
oj-3.11.5 test/bar.rb
oj-3.11.4 test/bar.rb
oj-3.11.3 test/bar.rb
oj-3.11.2 test/bar.rb
oj-3.11.1 test/bar.rb
oj-3.11.0 test/bar.rb
oj-3.10.18 test/bar.rb