Puppet Function: to_json
- Defined in:
- lib/puppet/functions/to_json.rb
- Function type:
- Ruby 4.x API
Overview
}
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet/functions/to_json.rb', line 13 Puppet::Functions.create_function(:to_json) do # @param data # Data structure which needs to be converted into JSON # @return [String] Converted data to JSON dispatch :to_json do param 'Any', :data end def to_json(data) data.to_json end end |