Function |into_json
json/value::|into_json
Usage
|into_json<T>(value)
Generics
◻ T: Serialize
Parameters
↳ value: T
Return
↴ Option<Json>
Return value as JSON, or none if it cannot be written as JSON, such as secrets.
Numbers, booleans, strings, bytes and characters become JSON scalars, void and none
become null, vectors become arrays, and data types are written as they define, such as
StringMap as an object of strings.