File: serialization.rb

package info (click to toggle)
puppet-agent 7.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,092 kB
  • sloc: ruby: 245,074; sh: 456; makefile: 38; xml: 33
file content (43 lines) | stat: -rw-r--r-- 1,434 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module Puppet::Pops
module Serialization
  def self.not_implemented(impl, method_name)
    raise NotImplementedError, "The class #{impl.class.name} should have implemented the method #{method_name}()"
  end

  class SerializationError < Puppet::Error
  end

  PCORE_TYPE_KEY = '__ptype'.freeze

  # Key used when the value can be represented as, and recreated from, a single string that can
  # be passed to a `from_string` method or an array of values that can be passed to the default
  # initializer method.
  PCORE_VALUE_KEY = '__pvalue'.freeze

  # Type key used for hashes that contain keys that are not of type String
  PCORE_TYPE_HASH = 'Hash'.freeze

  # Type key used for symbols
  PCORE_TYPE_SENSITIVE = 'Sensitive'.freeze
  PCORE_TYPE_BINARY = 'Binary'.freeze

  # Type key used for symbols
  PCORE_TYPE_SYMBOL = 'Symbol'.freeze

  # Type key used for Default
  PCORE_TYPE_DEFAULT = 'Default'.freeze

  # Type key used for document local references
  PCORE_LOCAL_REF_SYMBOL = 'LocalRef'.freeze
end
end

require_relative 'serialization/json_path'
require_relative 'serialization/from_data_converter'
require_relative 'serialization/to_data_converter'
require_relative 'serialization/to_stringified_converter'
require_relative 'serialization/serializer'
require_relative 'serialization/deserializer'
require_relative 'serialization/json'
require_relative 'serialization/time_factory'
require_relative 'serialization/object'