Skip to content
/ mavec Public

Converts an object-like json into a String vector.

License

Notifications You must be signed in to change notification settings

Propfend/mavec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mavec

Latest Version

mavec is a lightweight Rust library designed for transforming and handling Values data with ease. It provides utilities for converting Json-like objects into flattened Vec<String> representations, enabling seamless integration with applications that require efficient data processing, such as CLI tools, APIs, or data pipelines.

Getting started

add mavec to your dependencies in Cargo.toml:

[dependencies]
mavec = "0.1.2"

Usage

use mavec::core::to_vec;
use serde_json::json;

fn main() {
    let value = json!({
        "Jeff": true,
        "Rose": "Mary",
        "Miguel": 17,
    });
    
    assert_eq!(
        to_vec(value).unwrap(),
        Vec::from([
            "Jeff".to_string(),
            "true".to_string(),
            "Rose".to_string(),
            "Mary".to_string(),
            "Miguel".to_string(),
            "17".to_string()
        ])
    );
}

Contributing

Contributions are welcome! If you have ideas for new features or optimizations, feel free to open an issue or submit a pull request.

  • Fork the repository.
  • Create a new branch for your feature or bugfix.
  • Submit a pull request with a detailed explanation.

About

Converts an object-like json into a String vector.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages