JSON writer working