module Aws::Json::OjEngine
Constants
- DUMP_OPTIONS
-
@api private
- LOAD_OPTIONS
-
@api private
- PARSE_ERRORS
-
@api private
Public Class Methods
Source
# File lib/aws-sdk-core/json/oj_engine.rb, line 25 def dump(value) Oj.dump(value, DUMP_OPTIONS) end
Source
# File lib/aws-sdk-core/json/oj_engine.rb, line 19 def load(json) Oj.load(json, LOAD_OPTIONS) rescue *PARSE_ERRORS => e raise ParseError.new(e) end
Private Class Methods
Source
# File lib/aws-sdk-core/json/oj_engine.rb, line 33 def detect_oj_parse_errors require 'oj' if Oj.const_defined?(:ParseError) [Oj::ParseError, EncodingError, JSON::ParserError] else [SyntaxError] end rescue LoadError nil end
Oj before 1.4.0 does not define Oj::ParseError and instead raises SyntaxError on failure