Interface JsonReadable

All Known Implementing Classes:
InventoryFrame, ShoppingListFrame

public interface JsonReadable
An interface for reading JSON objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Collection<javafx.util.Pair<String,String>>
    readListFromJson(org.json.JSONArray jsonArray)
    Reads a list of items from a JSON array.
  • Method Details

    • readListFromJson

      default Collection<javafx.util.Pair<String,String>> readListFromJson(org.json.JSONArray jsonArray) throws FileNotFoundException
      Reads a list of items from a JSON array.
      Parameters:
      jsonArray - The JSON array to read from.
      Returns:
      A collection of pairs of strings.
      Throws:
      FileNotFoundException - If the file is not found.