Class: Puppet::Pops::Serialization::JSON::Reader Private

Inherits:
AbstractReader show all
Defined in:
lib/puppet/pops/serialization/json.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A Reader that reads JSON formatted input

Instance Method Summary collapse

Methods inherited from AbstractReader

#extension_unpacker, #primitive_count, #read, #read_tpl, #read_tpl_qname, #register_type, #register_types

Constructor Details

#initialize(io) ⇒ Reader

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.

Returns a new instance of Reader.



50
51
52
# File 'lib/puppet/pops/serialization/json.rb', line 50

def initialize(io)
  super(Unpacker.new(io))
end

Instance Method Details

#re_initialize(io) ⇒ 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.



54
55
56
# File 'lib/puppet/pops/serialization/json.rb', line 54

def re_initialize(io)
  @unpacker.re_initialize(io)
end

#read_payload(data) {|@unpacker| ... } ⇒ 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.

Yields:

  • (@unpacker)


58
59
60
# File 'lib/puppet/pops/serialization/json.rb', line 58

def read_payload(data)
  yield(@unpacker)
end