3 # Convert a data structure and output to JSON
5 # @example how to output JSON
6 # # output json to a file
7 # file { '/tmp/my.json':
9 # content => to_json($myhash),
12 Puppet::Functions.create_function(:to_json) do
14 # data structure which needs to be converted into JSON
15 # @return converted data to json