summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppet.com>2017-08-30 13:56:14 -0700
committerHunter Haugen <hunter@puppet.com>2017-08-30 13:56:14 -0700
commit7404ed3029b726ae9abbb9a4fc698090374bdf98 (patch)
tree4ee37d815cda7b1662dd692fa7113b217fa64e5b /README.md
parent1db550a16c49fb7f2f086d2a46bc666c477ee50d (diff)
parentbd324f9d86a79eb3a7a1a781c82eede8a4a447b8 (diff)
Merge pull request #809 from WhatsARanjit/to_json_yaml
Added to_json, to_json_pretty, and to_yaml functions
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7813f19..1b32396 100644
--- a/README.md
+++ b/README.md
@@ -1754,6 +1754,30 @@ Arguments: A single string.
*Type*: rvalue.
+#### `to_json`
+
+Converts input into a JSON String.
+
+For example, `{ "key" => "value" }` becomes `{"key":"value"}`.
+
+*Type*: rvalue.
+
+#### `to_json_pretty`
+
+Converts input into a pretty JSON String.
+
+For example, `{ "key" => "value" }` becomes `{\n \"key\": \"value\"\n}`.
+
+*Type*: rvalue.
+
+#### `to_yaml`
+
+Converts input into a YAML String.
+
+For example, `{ "key" => "value" }` becomes `"---\nkey: value\n"`.
+
+*Type*: rvalue.
+
#### `try_get_value`
**DEPRECATED:** replaced by `dig()`.