Convert a hash into JSON in Puppet