Sha256: bcde5b68049c32f556405f0134c5bc52bd0cc7b47a70a9fbff5065762fc1b230

Contents?: true

Size: 342 Bytes

Versions: 45

Compression:

Stored size: 342 Bytes

Contents

require 'json'

module Prometheus
  module Client
    module Helper
      module JsonParser
        class << self
          if defined?(Oj)
            def load(s)
              Oj.load(s)
            end
          else
            def load(s)
              JSON.parse(s)
            end
          end
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
prometheus-client-mmap-0.7.0.beta35 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.7.0.beta34 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.7.0.beta33 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.7.0.beta32 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.7.0.beta31 lib/prometheus/client/helper/json_parser.rb