KGy SOFT

JsonValueTryParse Method (Stream, JsonValue, Encoding)

KGy SOFT JSON Libraries Help
Tries to read a JsonValue from a Stream that contains JSON data.

Namespace:  KGySoft.Json
Assembly:  KGySoft.Json (in KGySoft.Json.dll) Version: 2.0.1
Syntax

public static bool TryParse(
	Stream stream,
	out JsonValue value,
	Encoding? encoding = null
)

Parameters

stream
Type: System.IOStream
A Stream that will be read for the JsonValue content.
value
Type: KGySoft.JsonJsonValue
When this method returns , the result of the parsing; otherwise, Undefined. This parameter is passed uninitialized.
encoding (Optional)
Type: System.TextEncoding
An Encoding that specifies the encoding of the JSON data in the stream. If , then UTF8 encoding will be used. This parameter is optional.
Default value: .

Return Value

Type: Boolean
if the parsing was successful; otherwise, .
See Also

Reference