module Aws::Json::OjEngine

def detect_oj_parse_errors

SyntaxError on failure
Oj before 1.4.0 does not define Oj::ParseError and instead raises
def detect_oj_parse_errors
  require 'oj'
  if Oj.const_defined?(:ParseError)
    [Oj::ParseError, EncodingError, JSON::ParserError]
  else
    [SyntaxError]
  end
rescue LoadError
  nil
end

def dump(value)

def dump(value)
  Oj.dump(value, DUMP_OPTIONS)
end

def load(json)

def load(json)
  Oj.load(json, LOAD_OPTIONS)
rescue *PARSE_ERRORS => e
  raise ParseError.new(e)
end