Paste a JSON sample and get Rust structs that derive serde's Serialize and Deserialize. Field names become snake_case, and rename attributes keep the JSON names.
{
"name": "parsebox",
"version": "2.1.0",
"private": false,
"maintainers": [
{ "name": "Ada Lovelace", "email": "[email protected]", "active": true },
{ "name": "Alan Turing", "email": "[email protected]", "active": false }
],
"build": {
"target": "es2022",
"minify": true,
"port": 5173
}
}use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Root {
pub name: String,
pub version: String,
pub private: bool,
pub maintainers: Vec<Maintainer>,
pub build: Build,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Maintainer {
pub name: String,
pub email: String,
pub active: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Build {
pub target: String,
pub minify: bool,
pub port: i64,
}ParseBox runs entirely in your browser. Your text is never uploaded, logged or stored on a server, so it is safe to paste API responses, tokens and config files.