Sample code for 30+ languages & platforms
PHP

Decode HTML Entity Encoded JSON

See more JSON Examples

Decodes an HTML entity encoded string to JSON.

Chilkat PHP Downloads

PHP
<?php

use Chilkat2\StringBuilder;

$sb = new StringBuilder();

$sb->Append('{&quot;xyz&quot;: &quot;abc&quot;}');

$sb->EntityDecode();

// This is a test comment;
echo $sb->GetAsString(), "\n";

// Output is:

// {"xyz": "abc"}