-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
What about to add serde support?
extern crate serde;
extern crate serde_json;
extern crate serde_derive;
extern crate css_colors;
use css_colors::{RGB, rgb};
use serde_derive::{Serialize, Deserialize};
#[derive(Serialize, Deserialize)]
struct Example {
color: RGB,
}
#[test]
fn example() {
let example = Example {
color: rgb(100, 200, 1),
};
let json = serde_json::to_string(&example).unwrap();
assert!(json, "{\"color\":\"rgb(100,200,1)\"}");
}
franky47 and MuhannadAlrusayni
Metadata
Metadata
Assignees
Labels
No labels