Manual parsing Json is tedious and error-prone. It contained a bunch of `unwrap`s and was hard to read. This replaces manual Json parsing with serde_derive implementation. Closes #1231