Sha256: 56149ea581da349405f1c7ea31af2d292425a2120c53cbbb72c2dac65f747dc2
Contents?: true
Size: 333 Bytes
Versions: 1
Compression:
Stored size: 333 Bytes
Contents
require 'oj' class Gon module JsonDumper def self.dump(object) Oj.dump(object, mode: :compat, time_format: :ruby) end end # NOTE : If we are using Oj, gsub works only with \u, not \\u module Escaper def self.escape_line_separator(javascript) javascript.gsub(/\u2028/u, '
') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gon-5.1.0 | lib/gon/json_dumper/oj.rb |