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.16.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.15.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.14.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.13.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.12.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.11.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.10.0 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.10 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.9 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.8 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.7 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.6 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.5 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.4 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.3 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.2 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.1 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.1.pre.rc.2 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.1.pre.rc.1 lib/prometheus/client/helper/json_parser.rb
prometheus-client-mmap-0.9.0.pre.rc.1 lib/prometheus/client/helper/json_parser.rb