$temp['auth'] = 1;
$temp['license'] = 'LifeTime';
$ds['127.0.0.1'] = $temp;
$ds['192.168.1.1'] = ['auth' => 1, 'license' => '1 day'];
echo @json_encode($ds);
Muốn dùng kiểu nào thì dùng, mẫu ở đây không biết là tự format và chèn thêm comment //... thì tùy chỉnh.