Python Write Text Array To Json Format