lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

decode.rs (295B)


      1 #![cfg(feature = "json")]
      2 
      3 use radroots_event::social::relay_document::RelayDocument;
      4 
      5 use crate::error::EventParseError;
      6 
      7 pub fn from_json(content: &str) -> Result<RelayDocument, EventParseError> {
      8     serde_json::from_str(content).map_err(|_| EventParseError::InvalidJson("relay_document"))
      9 }