text-to-json 0.1.3

Convert text to json in rust
Documentation
  • Coverage
  • 0%
    0 out of 6 items documented0 out of 2 items with examples
  • Size
  • Source code size: 5.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 293.84 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • adiatma

text-to-json

Convert text to json in rust.

Install

[dependencies]
text-to-json = "0.1.3"

How to use?

Please check main.rs.

extern crate text_to_json;

use text_to_json::read;

fn main() {
  match read::to_json(String::from("example.txt")) {
    Ok(content) => println!("{:?}", content),
    Err(_) => panic!("Error"),
  }
}

Please check example.txt.

// output
["{\"title\":\"hello world\"}", "{\"description\":\"lorem ipsume sit amet dolor\"}", "{\"date\":\"1211121\"}"]