canic-cli 0.35.11

Operator CLI for Canic fleet backup and restore workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use canic_host::response_parse::{find_string_field, parse_candid_text_field};

pub(super) use canic_host::response_parse::parse_cycle_balance_response;

pub(super) fn parse_canic_metadata_version_response(output: &str) -> Option<String> {
    serde_json::from_str::<serde_json::Value>(output)
        .ok()
        .and_then(|value| find_string_field(&value, "canic_version"))
        .or_else(|| parse_candid_text_field(output, "canic_version"))
}

#[cfg(test)]
mod tests;