Skip to content

Commit

Permalink
Merge pull request #81 from hossain-khan/doc/parser
Browse files Browse the repository at this point in the history
[ADDED] Sample kdoc for parser
  • Loading branch information
hossain-khan authored May 7, 2024
2 parents c72449d + c8600de commit e5ecfd8
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 e5ecfd8

Please sign in to comment.