parseToResult

suspend fun parseToResult(file: File): ParseResult

Parses the given file into a ParseResult using default configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

file

The JSON file of timeline data to be parsed.


suspend fun parseToResult(file: File, config: ParserConfig): ParseResult

Parses the given file into a ParseResult with custom configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

file

The JSON file of timeline data to be parsed.

config

Configuration options for parsing.


suspend fun parseToResult(inputStream: InputStream): ParseResult

Parses the given input stream into a ParseResult using default configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

inputStream

The input stream of JSON data to be parsed.


suspend fun parseToResult(inputStream: InputStream, config: ParserConfig): ParseResult

Parses the given input stream into a ParseResult with custom configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

inputStream

The input stream of JSON data to be parsed.

config

Configuration options for parsing.


suspend fun parseToResult(bufferedSource: BufferedSource): ParseResult

Parses the given buffered source into a ParseResult using default configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

bufferedSource

The buffered source of JSON data to be parsed.


suspend fun parseToResult(bufferedSource: BufferedSource, config: ParserConfig): ParseResult

Parses the given buffered source into a ParseResult with custom configuration.

Return

ParseResult.Success with the parsed data or ParseResult.Error with error information.

Parameters

bufferedSource

The buffered source of JSON data to be parsed.

config

Configuration options for parsing.