PWA -manifest help - php => json

Im building a manifest for a web app.

The manifest is in php … but the application type is json.
The reason for this is because i want to change some details dynamically via php

But im getting stuck with this error!
Manifest: property ‘icons’ ignored, type array expected. how can I resolve this?

<?php
$manifestmainname = 'Main Name';
$manifestshortname = 'Short Name';
$manifestimage_512 = 'favicon-images/icon-512x512.png';

$manifest = [
    "name" => "{$manifestmainname}",
	"short_name" => "{$manifestshortname}",
    "gcm_user_visible_only" => true,
    "description" => "Test platform",
    "start_url" => "/",
    "display" => "standalone",
    "orientation" => "portrait",
    "background_color" => "#ffffff",
    "theme_color" => "#000000",
    "icons" => [
      "src" => "{$manifestimage_512}",
      "sizes"=> "512x512",
      "type" => "image/png"
    ],
];

header('Content-Type: application/json');
echo $json_manifest = json_encode($manifest);
Community Page
Last updated: