Using out-of-the-box JSON writer