SOLVED Invalid JSON in WHM Api 1?

Killy123

Member
Oct 28, 2016
18
2
3
Bulgaria
cPanel Access Level
Root Administrator
When I make the following request to the WHM API 1 :
Code:
json-api/dumpzone?api.version=1&domain=andreytestdom1.com

I get these response , which is invalid JSON and I can not parse my response :

Code:
{
  "metadata": {
    "reason": "Zone Serialized",
    "version": 1,
    "result": 1,
    "command": "dumpzone"
  },
  "data": {
    "zone": [
      {
        "record": [
          {
            "raw": "; cPanel first:11.58.0.34 (update_time):1480075779 Cpanel::ZoneFile::VERSION:1.3 hostname:cnode01.webstyle.com latest:11.60.0.25",
            "Line": 1,
            "type": ":RAW",
            "ttl": "86400"
          },
          {
            "raw": "; Zone file for andreytestdom1.com",
            "Line": 2,
            "type": ":RAW",
            "ttl": "86400"
          },
          {
            "type": "$TTL",
            "ttl": "14400",
            "Line": 3
          },
          {
            "name": "andreytestdom1.com.",
            "rname": "reports.viscomp.bg",
            "Line": 4,
            "class": "IN",
            "serial": "2016112502",
            "Lines": 6,
            "retry": "7200",
            "minimum": "86400",
            "mname": "a.gtld-servers.net",
            "ttl": "86400",
            "refresh": "3600",
            "expire": "1209600",
            "type": "SOA"
          },
          {
            "ttl": "14400",
            "type": "TXT",
            "txtdata": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAneOt9uIwi6kmxa+36op43GL8/zH0ZPK3wJVizYT4xX+gR3oHYtlZItMujgpKfUuZYV9ainPCabVHhMuVhcJfKQYd9NoN64U1BZrOmuzPjiZ8LBUgpKu0T+vYmf4sChYXSjHbSnqrHfHJCbuCSXH9tq2WAhj7WqWEV8FHyJDecYngYyomospbYwJdxANNLeJyrGCkTC3RxRD1WaGmGc2du6M/Fa7ocutydeldKupNrVj27ceBDerqgr3dP++YM2CDk0i5N1GlcYDU+2XVrlxkBwZGWCqAWwRJByvscenmJ5I9FAyi2aY590u7rai+qEby2o6c89EF4mZfJSlYu7E+6wIDAQAB;",
            "char_str_list": [
              "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAneOt9uIwi6kmxa+36op43GL8/zH0ZPK3wJVizYT4xX+gR3oHYtlZItMujgpKfUuZYV9ainPCabVHhMuVhcJfKQYd9NoN64U1BZrOmuzPjiZ8LBUgpKu0T+vYmf4sChYXSjHbSnqrHfHJCbuCSXH9tq2WAhj7WqWEV8FHyJDecYngYyomospbYwJdxANNLeJyr\"",
              "GCkTC3RxRD1WaGmGc2du6M/Fa7ocutydeldKupNrVj27ceBDerqgr3dP++YM2CDk0i5N1GlcYDU+2XVrlxkBwZGWCqAWwRJByvscenmJ5I9FAyi2aY590u7rai+qEby2o6c89EF4mZfJSlYu7E+6wIDAQAB\\;"
            ],
            "unencoded": 1,
            "Line": 38,
            "name": "default._domainkey.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "type": "A",
            "ttl": "14400",
            "class": "IN",
            "name": "www.newtestapidomain.andreytestdom1.com.",
            "Line": 39,
            "address": "87.120.197.129"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "name": "autoconfig.newtestapidomain.andreytestdom1.com.",
            "Line": 40,
            "class": "IN"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 41,
            "name": "autodiscover.newtestapidomain.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "type": "SRV",
            "ttl": "14400",
            "priority": "0",
            "target": "cpanelemaildiscovery.cpanel.net",
            "weight": "0",
            "class": "IN",
            "port": "443",
            "name": "_autodiscover._tcp.newtestapidomain.andreytestdom1.com.",
            "Line": 42
          },
          {
            "type": "SRV",
            "ttl": "14400",
            "priority": "0",
            "target": "cnode01.webstyle.com",
            "weight": "0",
            "class": "IN",
            "port": "2079",
            "name": "_caldav._tcp.newtestapidomain.andreytestdom1.com.",
            "Line": 43
          },
          {
            "ttl": "14400",
            "type": "SRV",
            "Line": 44,
            "port": "2080",
            "name": "_caldavs._tcp.newtestapidomain.andreytestdom1.com.",
            "class": "IN",
            "weight": "0",
            "target": "cnode01.webstyle.com",
            "priority": "0"
          },
          {
            "weight": "0",
            "target": "cnode01.webstyle.com",
            "priority": "0",
            "name": "_carddav._tcp.newtestapidomain.andreytestdom1.com.",
            "port": "2079",
            "Line": 45,
            "class": "IN",
            "ttl": "14400",
            "type": "SRV"
          },
          {
            "class": "IN",
            "port": "2080",
            "Line": 46,
            "name": "_carddavs._tcp.newtestapidomain.andreytestdom1.com.",
            "priority": "0",
            "target": "cnode01.webstyle.com",
            "weight": "0",
            "type": "SRV",
            "ttl": "14400"
          },
          {
            "type": "TXT",
            "ttl": "14400",
            "txtdata": "path=/",
            "unencoded": 1,
            "char_str_list": [
              "path=/"
            ],
            "class": "IN",
            "Line": 47,
            "name": "_caldav._tcp.newtestapidomain.andreytestdom1.com."
          },
          {
            "type": "TXT",
            "ttl": "14400",
            "txtdata": "path=/",
            "unencoded": 1,
            "char_str_list": [
              "path=/"
            ],
            "class": "IN",
            "Line": 48,
            "name": "_caldavs._tcp.newtestapidomain.andreytestdom1.com."
          },
          {
            "name": "_carddav._tcp.newtestapidomain.andreytestdom1.com.",
            "Line": 49,
            "class": "IN",
            "char_str_list": [
              "path=/"
            ],
            "unencoded": 1,
            "txtdata": "path=/",
            "ttl": "14400",
            "type": "TXT"
          },
          {
            "class": "IN",
            "name": "_carddavs._tcp.newtestapidomain.andreytestdom1.com.",
            "Line": 50,
            "unencoded": 1,
            "char_str_list": [
              "path=/"
            ],
            "txtdata": "path=/",
            "type": "TXT",
            "ttl": "14400"
          },
          {
            "name": "cpcalendars.newtestapidomain.andreytestdom1.com.",
            "Line": 51,
            "address": "87.120.197.129",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "class": "IN",
            "address": "87.120.197.129",
            "name": "cpcontacts.newtestapidomain.andreytestdom1.com.",
            "Line": 52,
            "type": "A",
            "ttl": "14400"
          },
          {
            "class": "IN",
            "name": "webdisk.newtestapidomain.andreytestdom1.com.",
            "Line": 53,
            "address": "87.120.197.129",
            "type": "A",
            "ttl": "14400"
          },
          {
            "char_str_list": [
              "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslWxvt9YyukYAWmV3GIBnphU97HUiGt29Fmel8H90av2qeL1v6K0ST27fomitxF21fsu+77zhmvW3PO9ba2IU2hiz+s1hgh8Qhpc9wC7SdGhlWui7gF48x0wNY3vPbyNpQ/vdejEG9mIx7LJTSGJhysLpNn2KFTdp1szEU1+x8f41EfIuYQ01H6QVdzI4jrIA\"",
              "0Pw7aWJWhym0UOmVCEj/ECHSnXCPhPTT+hRvtNFXJZ7QgBvwrzuKlVmXOSy0gJxfLA06f0fVKfPon2/NPKNlInu6q+Jv4TAu/HkviNqe1vXpPKqykjjrQYN5h+KorFpCpLWlA+X7UfmuGAPmSGKIwIDAQAB\\;"
            ],
            "unencoded": 1,
            "name": "default._domainkey.newtestapidomain.andreytestdom1.com.",
            "Line": 54,
            "class": "IN",
            "ttl": "14400",
            "type": "TXT",
            "txtdata": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslWxvt9YyukYAWmV3GIBnphU97HUiGt29Fmel8H90av2qeL1v6K0ST27fomitxF21fsu+77zhmvW3PO9ba2IU2hiz+s1hgh8Qhpc9wC7SdGhlWui7gF48x0wNY3vPbyNpQ/vdejEG9mIx7LJTSGJhysLpNn2KFTdp1szEU1+x8f41EfIuYQ01H6QVdzI4jrIA0Pw7aWJWhym0UOmVCEj/ECHSnXCPhPTT+hRvtNFXJZ7QgBvwrzuKlVmXOSy0gJxfLA06f0fVKfPon2/NPKNlInu6q+Jv4TAu/HkviNqe1vXpPKqykjjrQYN5h+KorFpCpLWlA+X7UfmuGAPmSGKIwIDAQAB;"
          },
          {
            "raw": "",
            "Line": 55,
            "ttl": "86400",
            "type": ":RAW"
          },
          {
            "class": "IN",
            "Line": 56,
            "name": "andreytestdom1.com.",
            "unencoded": 1,
            "char_str_list": [
              "\"v=spf1 +a +mx +ip4:87.120.197.129 ~all\""
            ],
            "txtdata": "v=spf1 +a +mx +ip4:87.120.197.129 ~all",
            "type": "TXT",
            "ttl": "14400"
          },
          {
            "Line": 57,
            "raw": "",
            "type": ":RAW",
            "ttl": "86400"
          },
          {
            "Line": 58,
            "name": "newtestapidomain.andreytestdom1.com.",
            "class": "IN",
            "char_str_list": [
              "\"v=spf1 +a +mx +ip4:87.120.197.129 ~all\""
            ],
            "unencoded": 1,
            "txtdata": "v=spf1 +a +mx +ip4:87.120.197.129 ~all",
            "ttl": "14400",
            "type": "TXT"
          },
          {
            "Line": 59,
            "raw": "",
            "ttl": "86400",
            "type": ":RAW"
          },
          {
            "class": "IN",
            "name": "newaddondom.andreytestdom1.com.",
            "Line": 60,
            "address": "87.120.197.129",
            "type": "A",
            "ttl": "14400"
          },
          {
            "Line": 61,
            "name": "www.newaddondom.andreytestdom1.com.",
            "address": "87.120.197.129",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "raw": "",
            "Line": 62,
            "type": ":RAW",
            "ttl": "86400"
          },
          {
            "class": "IN",
            "address": "87.120.197.129",
            "Line": 63,
            "name": "cpcontacts.newaddondom.andreytestdom1.com.",
            "type": "A",
            "ttl": "14400"
          },
          {
            "address": "87.120.197.129",
            "name": "cpcalendars.newaddondom.andreytestdom1.com.",
            "Line": 64,
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "Line": 65,
            "name": "whm.newaddondom.andreytestdom1.com.",
            "address": "87.120.197.129",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "type": "A",
            "ttl": "14400",
            "class": "IN",
            "name": "cpanel.newaddondom.andreytestdom1.com.",
            "Line": 66,
            "address": "87.120.197.129"
          },
          {
            "name": "webmail.newaddondom.andreytestdom1.com.",
            "Line": 67,
            "address": "87.120.197.129",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "type": ":RAW",
            "ttl": "86400",
            "raw": "",
            "Line": 68
          },
          {
            "type": "A",
            "ttl": "14400",
            "class": "IN",
            "address": "87.120.197.129",
            "name": "webdisk.newaddondom.andreytestdom1.com.",
            "Line": 69
          },
          {
            "txtdata": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA159Nf4q/IKBFZU/FHJwB9zqkjY7MheT34G1oKrNzM66zPJXVfU6vPyE39AlhA2aOzQpUj/2zEEdXlLijI6Ds87lxzAoKpQOdvCcB1zqqW3p0YcK+fxF6Ui64103gxkM4eFc0Emtt8ZNt9HEKqTbyZPERK0iKXI5JqDkDLAyfOyOSaO6aMDQUTyXzY+Ed7FK3e7Ar5G1JHRkPhGpS4JrdBpzE2PQviHGhQ9jsbYW4QEWs5TEIs5PpLF8AJ+oveGzfuoxh2LbSzVUubLT9hsZ/oXBHfxdyWU9foEAeAV4hVvLc6sYuODiighDQFyv8e/zuzzkkBeIiWtT3wWZXnAaPbQIDAQAB;",
            "ttl": "14400",
            "type": "TXT",
            "name": "default._domainkey.newaddondom.andreytestdom1.com.",
            "Line": 70,
            "class": "IN",
            "char_str_list": [
              "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA159Nf4q/IKBFZU/FHJwB9zqkjY7MheT34G1oKrNzM66zPJXVfU6vPyE39AlhA2aOzQpUj/2zEEdXlLijI6Ds87lxzAoKpQOdvCcB1zqqW3p0YcK+fxF6Ui64103gxkM4eFc0Emtt8ZNt9HEKqTbyZPERK0iKXI5JqDkDLAyfOyOSaO6aMDQUTyXzY+Ed7FK3e\"",
              "7Ar5G1JHRkPhGpS4JrdBpzE2PQviHGhQ9jsbYW4QEWs5TEIs5PpLF8AJ+oveGzfuoxh2LbSzVUubLT9hsZ/oXBHfxdyWU9foEAeAV4hVvLc6sYuODiighDQFyv8e/zuzzkkBeIiWtT3wWZXnAaPbQIDAQAB\\;"
            ],
            "unencoded": 1
          },
          {
            "unencoded": 1,
            "char_str_list": [
              "\"v=spf1 +a +mx +ip4:87.120.197.129 ~all\""
            ],
            "class": "IN",
            "name": "newaddondom.andreytestdom1.com.",
            "Line": 71,
            "type": "TXT",
            "ttl": "14400",
            "txtdata": "v=spf1 +a +mx +ip4:87.120.197.129 ~all"
          },
          {
            "ttl": "14400",
            "type": "A",
            "name": "skii.andreytestdom1.com.",
            "Line": 72,
            "address": "87.120.197.129",
            "class": "IN"
          },
          {
            "address": "87.120.197.129",
            "name": "www.skii.andreytestdom1.com.",
            "Line": 73,
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "ttl": "14400",
            "type": "A",
            "Line": 74,
            "name": "cpanel.skii.andreytestdom1.com.",
            "address": "87.120.197.129",
            "class": "IN"
          },
          {
            "address": "87.120.197.129",
            "Line": 75,
            "name": "webmail.skii.andreytestdom1.com.",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "class": "IN",
            "name": "cpcalendars.skii.andreytestdom1.com.",
            "Line": 76,
            "address": "87.120.197.129",
            "type": "A",
            "ttl": "14400"
          },
          {
            "ttl": "14400",
            "type": "A",
            "Line": 77,
            "name": "webdisk.skii.andreytestdom1.com.",
            "address": "87.120.197.129",
            "class": "IN"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 78,
            "name": "whm.skii.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 79,
            "name": "cpcontacts.skii.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "type": "TXT",
            "ttl": "14400",
            "txtdata": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bl5eRVCu/Md3ZFI4nFdk5j/KVzhNAdS0HrPv1SHoShcH3+RZCM1QKK2rTpz2gyPXZEAl+TsrqfynVAve6h5TzSsLCtxPdfXYptUAZJDh+1sReYuq5ZI397oqmCtMTOYkgWfBaSrlMxp3zqo05o0piL4ny95ONTNYAwxrRlIDgoCpfixbqRghO64R2WVA7E2WG0392PC+FM6vHkGNv7pM2AG8fF0BLOwU/68EaY7tt2IuH4U+S8+KTF/5zRGZFbsJNKL0Aq2qotI+hjn4gnGi0qtAzFiT78oSilAcJgN/y03C12u2V4gGGS/e+OXfrx/hf1gQw/x2mROqocOvYSA+wIDAQAB;",
            "unencoded": 1,
            "char_str_list": [
              "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bl5eRVCu/Md3ZFI4nFdk5j/KVzhNAdS0HrPv1SHoShcH3+RZCM1QKK2rTpz2gyPXZEAl+TsrqfynVAve6h5TzSsLCtxPdfXYptUAZJDh+1sReYuq5ZI397oqmCtMTOYkgWfBaSrlMxp3zqo05o0piL4ny95ONTNYAwxrRlIDgoCpfixbqRghO64R2WVA7E2W\"",
              "G0392PC+FM6vHkGNv7pM2AG8fF0BLOwU/68EaY7tt2IuH4U+S8+KTF/5zRGZFbsJNKL0Aq2qotI+hjn4gnGi0qtAzFiT78oSilAcJgN/y03C12u2V4gGGS/e+OXfrx/hf1gQw/x2mROqocOvYSA+wIDAQAB\\;"
            ],
            "class": "IN",
            "name": "default._domainkey.skii.andreytestdom1.com.",
            "Line": 80
          },
          {
            "txtdata": "v=spf1 +a +mx +ip4:87.120.197.129 ~all",
            "type": "TXT",
            "ttl": "14400",
            "class": "IN",
            "Line": 81,
            "name": "skii.andreytestdom1.com.",
            "unencoded": 1,
            "char_str_list": [
              "\"v=spf1 +a +mx +ip4:87.120.197.129 ~all\""
            ]
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 82,
            "name": "test.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "class": "IN",
            "address": "87.120.197.129",
            "name": "www.test.andreytestdom1.com.",
            "Line": 83,
            "type": "A",
            "ttl": "14400"
          },
          {
            "class": "IN",
            "address": "87.120.197.129",
            "name": "cpcalendars.test.andreytestdom1.com.",
            "Line": 84,
            "type": "A",
            "ttl": "14400"
          },
          {
            "type": "A",
            "ttl": "14400",
            "class": "IN",
            "name": "cpcontacts.test.andreytestdom1.com.",
            "Line": 85,
            "address": "87.120.197.129"
          },
          {
            "Line": 86,
            "name": "cpanel.test.andreytestdom1.com.",
            "address": "87.120.197.129",
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 87,
            "name": "webdisk.test.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "address": "87.120.197.129",
            "name": "webmail.test.andreytestdom1.com.",
            "Line": 88,
            "class": "IN",
            "ttl": "14400",
            "type": "A"
          },
          {
            "ttl": "14400",
            "type": "A",
            "address": "87.120.197.129",
            "Line": 89,
            "name": "whm.test.andreytestdom1.com.",
            "class": "IN"
          },
          {
            "Line": 90,
            "name": "default._domainkey.test.andreytestdom1.com.",
            "class": "IN",
            "char_str_list": [
              "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy8IFVgxKDSYbNDEQfm06+pQDbXwxM/4nLfu63ecDO1oLKEY1vlZ18D04DEakHGnb7ZrMxO6VWEbN0Mm7xcHpJG8mde6WkmGUq6jmJhXieHrFZcBOmqg7R1GKToNHmGzmIa26KRPg0vE7pDaKQ+sG3rI2+Gtfexa12ZbU2rqyKlTzS5haoGm3Sr3bMkZxJHgi4\"",
              "n4F5Cz1xU8NxBvRJ9E6cvcDZQGtKpRDebK3JOItgJbKMc9ky9wEApojFqdwXMcKpUErEODN2rGnEZhuZoSyTAQjdsggpAF4ycdHV8AkPenab8OwxzhUje681dqN5UeJhgSkdhx1zbpLiZ6XgaUtxwIDAQAB\\;"
            ],
            "unencoded": 1,
            "txtdata": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy8IFVgxKDSYbNDEQfm06+pQDbXwxM/4nLfu63ecDO1oLKEY1vlZ18D04DEakHGnb7ZrMxO6VWEbN0Mm7xcHpJG8mde6WkmGUq6jmJhXieHrFZcBOmqg7R1GKToNHmGzmIa26KRPg0vE7pDaKQ+sG3rI2+Gtfexa12ZbU2rqyKlTzS5haoGm3Sr3bMkZxJHgi4n4F5Cz1xU8NxBvRJ9E6cvcDZQGtKpRDebK3JOItgJbKMc9ky9wEApojFqdwXMcKpUErEODN2rGnEZhuZoSyTAQjdsggpAF4ycdHV8AkPenab8OwxzhUje681dqN5UeJhgSkdhx1zbpLiZ6XgaUtxwIDAQAB;",
            "ttl": "14400",
            "type": "TXT"
          },
          {
            "type": "TXT",
            "ttl": "14400",
            "txtdata": "v=spf1 +a +mx +ip4:87.120.197.129 ~all",
            "unencoded": 1,
            "char_str_list": [
              "\"v=spf1 +a +mx +ip4:87.120.197.129 ~all\""
            ],
            "class": "IN",
            "Line": 91,
            "name": "test.andreytestdom1.com."
          }
        ]
      }
    ]
  }
};
 

Killy123

Member
Oct 28, 2016
18
2
3
Bulgaria
cPanel Access Level
Root Administrator
I read the linked thread, and it was not helpful.My problem is
"\" symbol in the JSON response for the "TXT" records, which invalidates the JSON. When I try
Code:
$test = json_decode($json);
in PHP the return value is NULL;
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello @Killy123,

I believe the output is valid, and the method used to decode it in your PHP script will need to account for that specific entry. However, please feel free to open a support ticket using the link in my signature so we can verify if that's the case.

Thank you.
 

Killy123

Member
Oct 28, 2016
18
2
3
Bulgaria
cPanel Access Level
Root Administrator
What do you mean - "I believe the output is valid...".The output contains "\" symbol, which is invalid according to the JSON -standard: JSON. It is a standard , It is not what you believe ...
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello @Killy123,

I've confirmed with one of our developers that the output is by design and working as expected:

Each element in the char_str_list array includes its quotes, and since JSON adds its own quotes, the quotes that came from the DNS record must be escaped. We know for sure that all the Perl JSON handlers will decode this correctly.
The issue could relate to PHP escaping more aggressively than is necessary, which may require you to update your PHP script to account for this. StackOverflow is a useful resource for PHP coding questions if you are still having trouble. Here's a slightly related thread that offers some information you may find helpful:

Escaping escape Characters

Thank you.