Add method for writing arrays to JsonService