Serialize a proto sandbox policy to a pretty-printed JSON string.
(policy: &SandboxPolicy)
| 989 | |
| 990 | /// Serialize a proto sandbox policy to a pretty-printed JSON string. |
| 991 | pub fn serialize_sandbox_policy_json(policy: &SandboxPolicy) -> Result<String> { |
| 992 | let json_repr = sandbox_policy_to_json_value(policy)?; |
| 993 | serde_json::to_string_pretty(&json_repr) |
| 994 | .into_diagnostic() |
| 995 | .wrap_err("failed to serialize policy to JSON") |
| 996 | } |
| 997 | |
| 998 | /// Load a sandbox policy from an explicit source. |
| 999 | /// |
nothing calls this directly
no test coverage detected