Giter VIP home page Giter VIP logo

microserde's Introduction

Microserde

Microserde is miniserde minus the dependencies.

All credit goes to David Tolnay for the original library.

From miniserde:

Prototype of a data structure serialization library with several opposite design goals from Serde.

Differences compared to miniserde:

  • ryu crate is replaced with stdlib functionality
  • itoa crate is replaced with stdlib functionality
  • serde crate is removed from dev-dependencies
[dependencies]
microserde = "0.1"

Example

use microserde::{json, Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Example {
    code: u32,
    message: String,
}

fn main() -> microserde::Result<()> {
    let example = Example {
        code: 200,
        message: "reminiscent of Serde".to_owned(),
    };

    let j = json::to_string(&example);
    println!("{}", j);

    let out: Example = json::from_str(&j)?;
    println!("{:?}", out);

    Ok(())
}

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 this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

microserde's People

Contributors

dtolnay avatar cloudhead avatar austinabell avatar theduke avatar kamilaborowska avatar

Stargazers

@RandyMcMillan avatar Prashis avatar Luke Frisken avatar Jan Pochyla avatar  avatar Terkwood avatar Jussi Norlund avatar Nicolas Sauzede avatar Andrew Chou avatar Nikita avatar Kyle Isom avatar  avatar Cezar avatar Andrejs Agejevs avatar Gonçalo Mendes Cabrita avatar Tyler Neely avatar Thomas Nicollet avatar iamazy avatar Zhao Xiaohong avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

microserde's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.