Skip to content

Commit

Permalink
[ADDED] Sample kdoc for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
hossain-khan committed May 7, 2024
1 parent c72449d commit c8600de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions parser/src/main/kotlin/Parser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ import okio.BufferedSource

/**
* Parser to parse Google Location Timeline JSON to Kotlin objects.
*
* Sample usages for parsing different JSON types:
* ```kotlin
* 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)
* ```
*/
class Parser constructor() {
// Moshi instance with custom adapter to parse the timeline data.
Expand Down

0 comments on commit c8600de

Please sign in to comment.