decode multimethod
Methods
- decode(s:Str, t:Type)experimental Source: stdlib.ngs:886
Decode (parse) strings such as command line arguments or environment variables to result given type
- decode(s:Str, hints:Hash={}) Source: stdlib.ngs:4994
Attempt to decode JSON. Uses decode_json().
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5003
EXPERIMENTAL. KVS (key-value separator) hint for decode() Example
decode('a b\nc d', {'KVS': ' '}) == {'a': 'b', 'c': 'd'}
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5012
EXPERIMENTAL. FS (field separator) hint for decode() Example
decode('a b\nc d', {'FS': ' '}) # [['a', 'b'], ['c', 'd']]
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5022
EXPERIMENTAL! Do not use! Handle fields_names hint - run decode() and make Arr[Hash] from Arr[Arr] using provided fields_names Example
backup_list = fetch('backup.list', {'FS': ' ', 'fields_names': %[env role]})
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5110
Parse the output of "aws" command. Extracts the array (see "s" below"). For "describe-instances", flattens the instance list. Parameters
s Str containing JSON with a Hash at top level with exactly one Arr as value hints hints.process.command.argv[0] must be 'aws' Returns
data structure, tyically an Arr at top level. If s is empty string - null.
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5172
Parse the output of "find" command which does not use "-printf". Handles "-print0". Parameters
hints hints.process.command.argv[0] must be 'find' Returns
Arr of Str
- decode(s:Str, hints:Hash) Source: stdlib.ngs:5183
Parse the output of "locate" command. Parameters
hints hints.process.command.argv[0] must be 'locate' Returns
Arr of Str