Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / functions / to_json.rb
index 782d695..20d39e7 100644 (file)
@@ -1,4 +1,6 @@
-# Take a data structure and output it as JSON
+require 'json'
+# @summary
+#   Convert a data structure and output to JSON
 #
 # @example how to output JSON
 #   # output json to a file
@@ -7,10 +9,10 @@
 #       content => to_json($myhash),
 #     }
 #
-#
-require 'json'
-
 Puppet::Functions.create_function(:to_json) do
+  # @param data
+  #   data structure which needs to be converted into JSON
+  # @return converted data to json
   dispatch :to_json do
     param 'Any', :data
   end