Information
This documentation supports the 21.05 (12.2) version of BMC Discovery.To view an earlier version of the product, select the version from the Product version menu.

json.encode


json.encode(value)


Converts value to a JSON encoded string. Where value is a string, table, or a list including nested structures.

If the value is not one of these types, for example, a node set from search, or there is a problem JSON encoding value returns none.


For example the following code fragment sets encoded to the string '{"args":"-l /clusters/cluster-1/exports/storage-views"}'

encoded := json.encode(table(args := '-l /clusters/cluster-1/exports/storage-views'));


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Discovery 21.05