pub fn parse_doh_txt_answers(json: &Value) -> StringExpand description
PURE. From a Cloudflare/Google DoH JSON response, read the "Answer" array and concatenate the
"data" field of every answer into one string.
DNS TXT values are transmitted as one or more length-prefixed character-strings (≤255 bytes
each); DoH resolvers surface a multi-part TXT as "part-a" "part-b" inside a single "data"
field, and split records may also appear as multiple Answer elements. In both cases the
logical value is the pieces concatenated with no separator, so we:
- take each answer’s
"data"string, - strip the surrounding double-quotes and any internal
" "string-boundary quotes, and - concatenate everything into one string (which is then a valid
_qdp.<domain>TXT value).
Missing / malformed answers are skipped; a body with no usable answers yields "".