Sha256: daf1489e0eb5dd61e4d57d558c46ea2214a03093360e374b1c0d47d294f51c2d
Contents?: true
Size: 883 Bytes
Versions: 133
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true require 'json' require_relative 'json/builder' require_relative 'json/error_handler' require_relative 'json/handler' require_relative 'json/parser' require_relative 'json/json_engine' require_relative 'json/oj_engine' module Aws # @api private module Json class ParseError < StandardError def initialize(error) @error = error super(error.message) end attr_reader :error end class << self def load(json) ENGINE.load(json) end def load_file(path) load(File.open(path, 'r', encoding: 'UTF-8', &:read)) end def dump(value) ENGINE.dump(value) end private def select_engine require 'oj' OjEngine rescue LoadError JSONEngine end end # @api private ENGINE = select_engine end end
Version data entries
133 entries across 133 versions & 1 rubygems