used better escaping for embedded JSON data