Sha256: ea11612965c25f2cacde4280a3eb72071b15ef2c855b329184d80262a1f1b472

Contents?: true

Size: 253 Bytes

Versions: 8

Compression:

Stored size: 253 Bytes

Contents

# frozen_string_literal: true

module Wayfarer
  module Parsing
    module JSON
    module_function

      def parse(json)
        if defined?(Oj)
          Oj.load(json)
        else
          ::JSON.parse(json)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wayfarer-0.4.7 lib/wayfarer/parsing/json.rb
wayfarer-0.4.6 lib/wayfarer/parsing/json.rb
wayfarer-0.4.5 lib/wayfarer/parsing/json.rb
wayfarer-0.4.4 lib/wayfarer/parsing/json.rb
wayfarer-0.4.3 lib/wayfarer/parsing/json.rb
wayfarer-0.4.2 lib/wayfarer/parsing/json.rb
wayfarer-0.4.1 lib/wayfarer/parsing/json.rb
wayfarer-0.4.0 lib/wayfarer/parsing/json.rb