MCPcopy Index your code
hub / github.com/BitVM/BitVM / serialize

Function serialize

bridge/src/serialization.rs:3–7  ·  view source on GitHub ↗
(object: &impl Serialize)

Source from the content-addressed store, hash-verified

1use serde::{Deserialize, Serialize};
2
3pub fn serialize(object: &impl Serialize) -> String {
4 serde_json::to_string(object)
5 .map_err(|e| format!("Failed to serialize an object to JSON: {}", e))
6 .unwrap()
7}
8
9pub fn deserialize<'a, T>(data: &'a str) -> T
10where

Callers 12

get_superblock_messageFunction · 0.85
save_private_dataMethod · 0.85
read_from_data_storeMethod · 0.85
save_to_data_storeMethod · 0.85
setup_test_fullFunction · 0.85
serializeMethod · 0.85
serialize_txinFunction · 0.85
serialize_txoutFunction · 0.85

Calls

no outgoing calls