fix(gatesnotes): the unfucked their json (#3849)

This commit is contained in:
Dag 2023-12-19 08:46:37 +01:00 committed by GitHub
parent 3944ae68cb
commit 0c6ffbf5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -23,12 +23,14 @@ class GatesNotesBridge extends BridgeAbstract
$cleanedContent = str_replace([
'<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">',
'</string>',
'\r\n',
], '', $rawContent);
$cleanedContent = str_replace('\"', '"', $cleanedContent);
$cleanedContent = trim($cleanedContent, '"');
// $cleanedContent = str_replace('\"', '"', $cleanedContent);
// $cleanedContent = trim($cleanedContent, '"');
$json = Json::decode($cleanedContent, false);
if (is_string($json)) {
throw new \Exception('wtf? ' . $json);
}
foreach ($json as $article) {
$item = [];