(path: FilePath)
Load JSON from file or standard input.

    path (FilePath): The file path. "-" for reading from stdin.
    RETURNS (JSONOutput): The loaded JSON content.
Load JSON from file or standard input.
Load JSON from file or standard input .
def read_json(path: FilePath) -> JSONOutput:
    """Load JSON from file or standard input.

    path (FilePath): The file path. "-" for reading from stdin.
    RETURNS (JSONOutput): The loaded JSON content.
    """
    if path == "-":  # reading from sys.stdin
        data = sys.stdin.read()
        return ujson.loads(data)
    file_path = force_path(path)
    with file_path.open("r", encoding="utf8") as f:
        return ujson.load(f)
def read_json ( path : FilePath ) -> JSONOutput : if path == "-" : # reading from sys.stdin data = sys . stdin . read ( ) return ujson . loads ( data ) file_path = force_path ( path ) with file_path . open ( "r" , encoding = "utf8" ) as f : return ujson . load ( f )