Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 809 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 809 Bytes

# JSON Serialization in Rust

This repository contains a simple example of JSON serialization and deserialization in Rust using the `serde` crate. The example defines an `Article` struct with nested `Paragraph` structs, serializes an instance of `Article` to a JSON string, and prints the result.

## Dependencies


  • [serde](https://crates.io/crates/serde) - A framework for serializing and deserializing Rust data structures efficiently and generically.
  • [serde_json](https://crates.io/crates/serde_json) - A JSON serialization and deserialization library for Rust.

  • To add these dependencies to your project, include the following in your `Cargo.toml` file:

    [dependencies]
    serde = { version = "1.0", features = ["derive"] }
    serde_json = "1.0"