Parser

class Parser

Parser to parse Google Location Timeline JSON to Kotlin objects.

Sample usages for parsing different JSON types:

val parser = Parser()

// ...
val bufferedSourceRecords: BufferedSource = recordsFile.source().buffer()
val records = parser.parseRecords(bufferedSourceRecords)

// ...
val bufferedSourceSemantic: BufferedSource = semanticMonthFile.source().buffer()
val semanticTimeline = parser.parseSemanticTimeline(bufferedSourceSemantic)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Parse JSON string to Records object.

fun parseRecords(bufferedSource: BufferedSource): Records

Parse JSON buffered source to Records object.

Link copied to clipboard

Parse JSON string to SemanticTimeline object.

fun parseSemanticTimeline(bufferedSource: BufferedSource): SemanticTimeline

Parse JSON buffered source to SemanticTimeline object.

Link copied to clipboard

Parse JSON string to Settings object.

fun parseSettings(bufferedSource: BufferedSource): Settings

Parse JSON buffered source to Settings object.

Link copied to clipboard

Parse JSON string to TimelineEdits object.

fun parseTimelineEdits(bufferedSource: BufferedSource): TimelineEdits

Parse JSON buffered source to TimelineEdits object.