pub async fn sign_json(&self, mut json: Value) -> String {
        let object = json.as_object_mut().expect("Canonical json value isn't an object");
        object.remove("unsigned");
        object.remove("signatures");

        let canonical_json: CanonicalJsonValue =
            json.try_into().expect("Can't canonicalize the json value");

        self.sign(&canonical_json.to_string()).await
    }
/// Convert a JSON value to the canonical representation and sign the JSON
/// string.
///
/// # Arguments
///
/// * `json` - The value that should be converted into a canonical JSON
/// string.
///
/// # Panic
///
/// Panics if the json value can't be serialized.
Convert a JSON value to the canonical representation and sign the JSON
string.
Convert a JSON value to the canonical representation and sign the JSON string .
pub async fn sign_json(&self, mut json: Value) -> String {
        let object = json.as_object_mut().expect("Canonical json value isn't an object");
        object.remove("unsigned");
        object.remove("signatures");
        let canonical_json: CanonicalJsonValue =
            json.try_into().expect("Can't canonicalize the json value");
        self.sign(&canonical_json.to_string()).await
    }
pub async fn sign_json ( & self , mut json : Value ) -> String { let object = json . as_object_mut ( ) . expect ( " " ) ; object . remove ( " " ) ; object . remove ( " " ) ; let canonical_json : CanonicalJsonValue = json . try_into ( ) . expect ( " " ) ; self . sign ( & canonical_json . to_string ( ) ) . await }
Convert a JSON value to the canonical representation and sign the JSON
string.
Convert a JSON value to the canonical representation and sign the JSON string .
&self
json
Value
&self
json
Value
panic
Panics if the json value can't be serialized.
Panics if the json value can ' t be serialized .