bellande_parser

Crates.iobellande_parser
lib.rsbellande_parser
version0.0.1
sourcesrc
created_at2024-09-13 00:00:11.119583
updated_at2024-09-13 00:00:11.119583
descriptionBellande File Format
homepage
repository
max_upload_size
id1373220
size9,835
Ronaldson Bellande (RonaldsonBellande)

documentation

README

Bellande Format Rust Example

use std::collections::HashMap;
use bellande::{BellandeFormat, BellandeValue};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a BellandeFormat instance
    let bellande_formatter = BellandeFormat;

    // Parse a Bellande file
    let parsed_data = bellande_formatter.parse_bellande("path/to/your/file.bellande")?;
    println!("{:#?}", parsed_data);

    // Create data to write
    let mut data_to_write = HashMap::new();
    data_to_write.insert("key".to_string(), BellandeValue::String("value".to_string()));
    data_to_write.insert("list".to_string(), BellandeValue::List(vec![
        BellandeValue::Integer(1),
        BellandeValue::Integer(2),
        BellandeValue::Integer(3),
    ]));
    let bellande_value = BellandeValue::Map(data_to_write);

    // Write data to a Bellande file
    bellande_formatter.write_bellande(&bellande_value, "path/to/output/file.bellande")?;

    Ok(())
}

Website NPM

Installation

  • cargo add bellande_format

Name: bellande_format
Version: 0.1.0
Summary: File type Formats
Home-page: github.com/RonaldsonBellande/bellande_format
Author: Ronaldson Bellande
Author-email: ronaldsonbellande@gmail.com
License: GNU General Public License v3.0

License

This Algorithm or Models is distributed under the Creative Commons Attribution-ShareAlike 4.0 International License, see LICENSE and NOTICE for more information.

Commit count: 0

cargo fmt