read_json#

module wntr.network.io

read_json(path_or_buf, append=None, **kw_json)[source]#

Create or append a WaterNetworkModel from a JSON file

Parameters:
  • f (str) – Name of the file or file pointer

  • append (WaterNetworkModel or None, optional) – Existing WaterNetworkModel to append. If None, a new WaterNetworkModel is created.

  • kw_json (keyword arguments) – Keyword arguments to pass to json.load

Return type:

WaterNetworkModel