poe_data_tools 1.0.0

A library for working with Path of Exile game data
Documentation
1
2
3
4
5
6
7
8
9
10
11
use anyhow::Context;

use super::types::*;
use crate::file_parsers::shared::remove_trailing;

pub fn parse_mat_str(contents: &str) -> anyhow::Result<MATFile> {
    let contents = remove_trailing(contents);
    let contents = contents.trim();

    serde_json::from_str(contents).context("Failed to parse file")
}