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


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

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.


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

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)

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

def read_payload(data)
  yield(@unpacker)
end