Update writeJSON()

Signed-off-by: Simone <hello@simonewebdesign.it>