From bd324f9d86a79eb3a7a1a781c82eede8a4a447b8 Mon Sep 17 00:00:00 2001 From: WhatsARanjit Date: Fri, 25 Aug 2017 01:11:35 +0000 Subject: Added to_json function with tests and README --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'README.md') 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()`. -- cgit v1.2.3