Skip to content

ScriptWare-Software/pb-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

pb-to-json

pb_to_json is a Rust library for converting protocol buffer strings to JSON. It provides a simple and efficient way to transform protocol buffer data into a JSON representation. That's it.

Features

  • Converts protocol buffer strings to JSON
  • Supports nested objects and repeated fields
  • Handles key-value pairs of different types (string, number, boolean)
  • Provides a user-friendly API

View this project on crates.io

Installation

To use this basic library, add the following to your Cargo.toml file:

[dependencies]
pb_to_json = "0.1.1"

Usage

Here's a basic example of how to use pb_to_json:

use pb_to_json::convert_pb_to_json;

fn main() {
    let pb_string = r#"
        name: "John Doe"
        age: 30
        city: "New York"
    "#;

    let json_string = convert_pb_to_json(pb_string);
    println!("{}", json_string);
}

Output

{
    "name": "John Doe",
    "age": "30",
    "city": "New York"
}

Contributions

Found a way to improve this library? Open an issue or submit a pull request to the repository! We're happy to review it.

License

pb_to_json is licensed under the MIT license.

About

Simple protocol buffer to JSON conversion via Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages