You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Json::Parser

Inherits:
Object
  • Object
show all
Includes:
Seahorse::Model::Shapes
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/json/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(rules) ⇒ Parser

Returns a new instance of Parser

Parameters:

  • rules (Seahorse::Model::ShapeRef)


11
12
13
# File 'gems/aws-sdk-core/lib/aws-sdk-core/json/parser.rb', line 11

def initialize(rules)
  @rules = rules
end

Instance Method Details

#parse(json, target = nil) ⇒ Object

Parameters:

  • json (String<JSON>)


16
17
18
# File 'gems/aws-sdk-core/lib/aws-sdk-core/json/parser.rb', line 16

def parse(json, target = nil)
  parse_ref(@rules, Json.load(json), target)
end