Test json writer