parse Semantic Timeline
Parse JSON string to SemanticTimeline object.
// Sample usage of parser to parse semantic timeline JSON.
val parser = Parser()
val json: String = File("your-file.json").bufferedReader().readText()
val semanticTimeline: SemanticTimeline = parser.parseSemanticTimeline(json)
println("Got semantic timeline: ${semanticTimeline.timelineObjects.size} objects.")
Content copied to clipboard
Parse JSON buffered source to SemanticTimeline object.
// Sample usage of parser to parse semantic timeline JSON.
val parser = Parser()
val bufferedSource: BufferedSource = File("your-file.json").source().buffer()
val semanticTimeline: SemanticTimeline = parser.parseSemanticTimeline(bufferedSource)
println("Got semantic timeline: ${semanticTimeline.timelineObjects.size} objects.")
Content copied to clipboard