Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

openEPD Converter #23

Open
ocni-dtu opened this issue Feb 1, 2024 · 0 comments
Open

openEPD Converter #23

ocni-dtu opened this issue Feb 1, 2024 · 0 comments
Labels
💻 Task Development Task

Comments

@ocni-dtu
Copy link
Owner

ocni-dtu commented Feb 1, 2024

Parse an openEPD formatted JSON into EPDx

/// Parse a openEPD formatted EPD in an EPDx struct
///
/// # Arguments
///
/// * `json`: JSON formatted string containing the EPD on openEPD format
///
/// returns: EPD
pub fn parse_openepd(json: String) -> Result<EPD, Error> {
    let epd = serde_json::from_str(&json);
    match epd {
        Ok(epd) => Ok(epd),
        Err(err) => Err(err)
    }
}
@ocni-dtu ocni-dtu added the 💻 Task Development Task label Feb 1, 2024
@ocni-dtu ocni-dtu moved this to Ready in LCAx Development Feb 1, 2024
@ocni-dtu ocni-dtu moved this from Ready to Backlog in LCAx Development Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 Task Development Task
Projects
Status: Backlog
Development

No branches or pull requests

1 participant