From 44420002c7da35e0ca44f593470c4e40d910aab1 Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Sat, 6 Dec 2025 18:15:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/OpenFoodFactsSDK/Schemas/NutriscoreData.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/OpenFoodFactsSDK/Schemas/NutriscoreData.swift b/Sources/OpenFoodFactsSDK/Schemas/NutriscoreData.swift index e738e44..174f218 100644 --- a/Sources/OpenFoodFactsSDK/Schemas/NutriscoreData.swift +++ b/Sources/OpenFoodFactsSDK/Schemas/NutriscoreData.swift @@ -35,10 +35,10 @@ public struct NutriscoreData: Sendable, Codable { isBeverage = try container.decodeIfPresent( Int.self, forKey: .isBeverage) - isCheese = try container.decodeIfPresent(Int.self, forKey: .isCheese) + isCheese = try container.decodeStringOrInt(forKey: .isCheese) isWater = try container.decodeStringOrInt(forKey: .isWater) - isFat = try container.decodeIfPresent(Int.self, forKey: .isFat) - energy = try container.decodeIfPresent(Int.self, forKey: .energy) + isFat = try container.decodeStringOrInt(forKey: .isFat) + energy = try container.decodeStringOrInt(forKey: .energy) }