class LigneSimple:
    def __init__(self):
        self.designation = ""
        self.qte = 0
        self.note = ""
        self.style = {}

    def from_json(self, jsonObject):
        """
        Extraire les attributs du jsonObject.

        Exemple de json attendu :
        {
            "designation": "Plat XXXXXXX",
            "qte": 1,
            "note": "Sans quelque chose",
            "style": {}
        },
        """

        self.designation = jsonObject.get("designation")

        try:
            self.qte = int(jsonObject.get("qte"))
        except:
            self.qte = ""

        self.note = jsonObject.get("note")
        self.style = jsonObject.get("style")
