Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Serialize A Vec In Rust

Code

```cargo
[dependencies]
serde_json = "1.0.114"
```
use serde_json;

fn main() {
  let data: Vec<String> = vec!["ping".to_string()];
  let serialized = serde_json::to_string(&data).unwrap();
  println!("{}", serialized);
}

Results

["ping"]