JsonHelperReadJsonFromFile Method

Reads the Json from a file.

Definition

Namespace: Common.Core.Classes
Assembly: Common.Core (in Common.Core.dll) Version: 2.1.5
C#
public static string? ReadJsonFromFile(
	string fileName
)

Parameters

fileName  String
Json file name.

Return Value

String
is returned if the file could not be accessed.

Exceptions

ArgumentExceptionThrown when one of the arguments provided to a method is not valid.
IOExceptionThrown when an I/O error occurs.
NotSupportedExceptionThrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.
OutOfMemoryExceptionThrown when there is not enough memory to continue.
SecurityExceptionThrown when a security error is detected.
UnauthorizedAccessExceptionThrown when the operating system denies access because of an I/O error or a specific type of security error.

See Also