Module: Aws::Json Private
- Defined in:
- lib/aws-sdk-core/json.rb,
lib/aws-sdk-core/json/parser.rb,
lib/aws-sdk-core/json/builder.rb,
lib/aws-sdk-core/json/handler.rb,
lib/aws-sdk-core/json/oj_engine.rb,
lib/aws-sdk-core/json/json_engine.rb,
lib/aws-sdk-core/json/error_handler.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Builder, ErrorHandler, Handler, JSONEngine, OjEngine, ParseError, Parser
Class Method Summary collapse
- .dump(value) ⇒ Object private
- .load(json) ⇒ Object private
- .load_file(path) ⇒ Object private
Class Method Details
.dump(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 |
# File 'lib/aws-sdk-core/json.rb', line 35 def dump(value) ENGINE.dump(value, *ENGINE_DUMP_OPTIONS) end |
.load(json) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 |
# File 'lib/aws-sdk-core/json.rb', line 25 def load(json) ENGINE.load(json, *ENGINE_LOAD_OPTIONS) rescue ENGINE_ERROR => e raise ParseError.new(e) end |
.load_file(path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/aws-sdk-core/json.rb', line 31 def load_file(path) self.load(File.open(path, 'r', encoding: 'UTF-8') { |f| f.read }) end |