Changed a little bit the conversion to JSON chatline