def getProducts_json(self): products = [] data = Utility.read_json(Data.PRODUCTS_JSON_FILE) for item in data['products']: product = Product(item['name'], item['desc'], item['price']) products.append(product) return products
def read_products_from_json(sefl): products = [] data = Utility.read_json(Data.PRODUCT_FILE) for item in data['products']: product = Product(item['name'], item['desc'], item['price']) products.append(product) return products