Add method to escape json strings