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

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.



32
33
34
# File 'lib/aws-sdk-core/json.rb', line 32

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.



22
23
24
25
26
# File 'lib/aws-sdk-core/json.rb', line 22

def load(json)
  ENGINE.load(json, *ENGINE_LOAD_OPTIONS)
rescue *ENGINE_ERRORS => e
  raise ParseError, 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.



28
29
30
# File 'lib/aws-sdk-core/json.rb', line 28

def load_file(path)
  load(File.open(path, 'r', encoding: 'UTF-8', &:read))
end