'invalid json', 'message' => $e->getMessage(), ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL; return; } echo json_encode([ 'method' => $method, 'content_type' => $contentType, 'name' => $payload['name'] ?? null, 'quantity' => $payload['quantity'] ?? null, ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL;