0

what is this format and how to decode it to plain json?

a:24:{s:12:"webhook_data";a:41:{s:2:"id";i:4582988775555;s:8:"order_id";

It is way longer so I am pasting only little sample of it. There are such a:24 and any other symbols everywhere.

Toma Tomov
  • 1,476
  • 19
  • 55
  • It looks like the [PHP Serialization Format](https://en.wikipedia.org/wiki/PHP_serialization_format), which can be unserialized using the [unserialize function](https://www.php.net/manual/en/function.unserialize.php). It probably (not guaranteed) can be converted to JSON using `json_encode(unserialize($your_data));` – qrsngky May 18 '23 at 07:24
  • 1
    That is wordpress [serialized data](https://wpengine.com/support/wordpress-serialized-data/) – rzlvmp May 18 '23 at 07:30
  • @rzlvmp it's available in any PHP program, not just wordpress – ADyson May 18 '23 at 08:52

0 Answers0