class Aws::Json::RpcBodyHandler

def build_json(context)

def build_json(context)
  if shape = context.operation.input
    context.http_request.body = Builder.new.to_json(shape, context.params)
  else
    context.http_request.body = '{}'
  end
end

def call(context)

Returns:
  • (Seahorse::Client::Response) -

Parameters:
  • context (Seahorse::Client::RequestContext) --
def call(context)
  build_json(context)
  @handler.call(context).on_success do |response|
    unless response.error
      response.data = parse_json(context)
    end
  end
end

def parse_json(context)

def parse_json(context)
  if output_shape = context.operation.output
    json = context.http_response.body_contents
    json = '{}' if json == ''
    Parser.new.parse(output_shape, json)
  else
    EmptyStructure.new
  end
end