Improve docs on JSON

- add one simple example of using `ToJson` trait
- make example code more readable
Why is this a method instead of just doing it in main?