ipld_to_json

Function ipld_to_json 

Source
pub fn ipld_to_json(ipld: &Ipld) -> Result<String>
Expand description

Encodes IPLD data to DAG-JSON string.

ยงExamples

use ipfrs_core::{utils::ipld_to_json, Ipld};

let ipld = Ipld::String("hello".to_string());
let json = ipld_to_json(&ipld).unwrap();