0

I notice that the JSON returned from https://googleads.g.doubleclick.net/pagead/id has the characters )]}' at the top of the response, rendering the resulting data unparseable by JSON.parse(), or any other typical JSON parser. Since it consists entirely of random punctuation, I've been unable to coax any of the usual search engines into telling me anything about this strange pattern.

Is that practice documented somewhere? What's its purpose?

Complete example

)]}'

{"id":"ANyPxKoB8RXojXE04wzPs6XPWLf8jfwTIIz7z5yP0Nty0okYZoyQVdoZN1SubUUvrugz00VCshNAGs4KV15j419hQey1el_7Ow"}
sblom
  • 25,623
  • 4
  • 65
  • 95
  • Duplicate: https://stackoverflow.com/q/63961703/2557263 – Alejandro Sep 24 '20 at 23:09
  • Probably the same as [Why does Google prepend while(1); to their JSON responses?](https://stackoverflow.com/questions/2669690/why-does-google-prepend-while1-to-their-json-responses) – Bergi Sep 24 '20 at 23:44

0 Answers0