Sha256: 83765254cf28e6914a01f425c33d27ae35c9f77bccc3bdfa6171bc46d44281b6
Contents?: true
Size: 610 Bytes
Versions: 39
Compression:
Stored size: 610 Bytes
Contents
require 'multi_json' module SimpleCov::JSON class << self def parse(json) # Detect and use available MultiJson API - it changed in v1.3 if MultiJson.respond_to?(:adapter) MultiJson.load(json) else MultiJson.decode(json) end end def dump(string) if defined? ::JSON ::JSON.pretty_generate(string) else # Detect and use available MultiJson API - it changed in v1.3 if MultiJson.respond_to?(:adapter) MultiJson.dump(string) else MultiJson.encode(string) end end end end end
Version data entries
39 entries across 31 versions & 9 rubygems