added method to convert json to multiline string