All Projects → serde-rs → Serde

serde-rs / Serde

Licence: other
Serialization framework for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Serde

futures-async-stream
Async stream for Rust and the futures crate.
Stars: ✭ 141 (-97.12%)
Mutual labels:  no-std
Drone Core
The core crate for Drone, an Embedded Operating System.
Stars: ✭ 263 (-94.63%)
Mutual labels:  no-std
Time
Simple time handling in Rust
Stars: ✭ 334 (-93.19%)
Mutual labels:  no-std
tiny-nix-ipc
Minimal Rust wrapper for using sockets as IPC with file descriptor passing
Stars: ✭ 14 (-99.71%)
Mutual labels:  serde
liar
Flexible, stand-alone benchmarking
Stars: ✭ 16 (-99.67%)
Mutual labels:  no-std
Cortex M Rt
Minimal startup / runtime for Cortex-M microcontrollers
Stars: ✭ 286 (-94.16%)
Mutual labels:  no-std
easy-ext
An attribute macro for easily writing extension trait pattern.
Stars: ✭ 17 (-99.65%)
Mutual labels:  no-std
Hyperjson
A hyper-fast Python module for reading/writing JSON data using Rust's serde-json.
Stars: ✭ 374 (-92.37%)
Mutual labels:  serde
littlefs2
Idiomatic Rust API for littlefs
Stars: ✭ 19 (-99.61%)
Mutual labels:  no-std
Nvptx
How to: Run Rust code on your NVIDIA GPU
Stars: ✭ 335 (-93.16%)
Mutual labels:  no-std
pwm-pca9685-rs
Platform-agnostic Rust driver for the PCA9685 I2C 16-channel, 12-bit PWM/Servo/LED controller
Stars: ✭ 19 (-99.61%)
Mutual labels:  no-std
drone-cortexm
ARM® Cortex®-M platform crate for Drone, an Embedded Operating System.
Stars: ✭ 31 (-99.37%)
Mutual labels:  no-std
Rubble
(going to be a) BLE stack for embedded Rust
Stars: ✭ 292 (-94.04%)
Mutual labels:  no-std
rust-hcl
A Rust library for working with the HashiCorp Configuration Language (HCL).
Stars: ✭ 14 (-99.71%)
Mutual labels:  serde
Serde Yaml
Strongly typed YAML library for Rust
Stars: ✭ 364 (-92.57%)
Mutual labels:  serde
async-stm32f1xx
Abstractions for asynchronous programming on the STM32F1xx family of microcontrollers.
Stars: ✭ 24 (-99.51%)
Mutual labels:  no-std
Rustlang Cn
Rust中文
Stars: ✭ 283 (-94.23%)
Mutual labels:  serde
Cortex M
Low level access to Cortex-M processors
Stars: ✭ 379 (-92.27%)
Mutual labels:  no-std
Cortex M Quickstart
Template to develop bare metal applications for Cortex-M microcontrollers
Stars: ✭ 372 (-92.41%)
Mutual labels:  no-std
Embedded Graphics
A no_std graphics library for embedded applications
Stars: ✭ 293 (-94.02%)
Mutual labels:  no-std

Serde   Build Status Latest Version serde: rustc 1.13+ serde_derive: rustc 1.31+

Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.


You may be looking for:

Serde in action

Click to show Cargo.toml. Run this code in the playground.
[dependencies]

# The core APIs, including the Serialize and Deserialize traits. Always
# required when using Serde. The "derive" feature is only required when
# using #[derive(Serialize, Deserialize)] to make Serde work with structs
# and enums defined in your crate.
serde = { version = "1.0", features = ["derive"] }

# Each data format lives in its own crate; the sample code below uses JSON
# but you may be using a different one.
serde_json = "1.0"

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Point {
    x: i32,
    y: i32,
}

fn main() {
    let point = Point { x: 1, y: 2 };

    // Convert the Point to a JSON string.
    let serialized = serde_json::to_string(&point).unwrap();

    // Prints serialized = {"x":1,"y":2}
    println!("serialized = {}", serialized);

    // Convert the JSON string back to a Point.
    let deserialized: Point = serde_json::from_str(&serialized).unwrap();

    // Prints deserialized = Point { x: 1, y: 2 }
    println!("deserialized = {:?}", deserialized);
}

Getting help

Serde is one of the most widely used Rust libraries so any place that Rustaceans congregate will be able to help you out. For chat, consider trying the #general or #beginners channels of the unofficial community Discord, the #rust-usage channel of the official Rust Project Discord, or the #general stream in Zulip. For asynchronous, consider the [rust] tag on StackOverflow, the /r/rust subreddit which has a pinned weekly easy questions post, or the Rust Discourse forum. It's acceptable to file a support issue in this repo but they tend not to get as many eyes as any of the above and may get closed without a response after some time.


License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].