parse Settings
Parse JSON string to Settings object.
This method efficiently parses Google Takeout Settings.json data using cached adapters for optimal performance on repeated calls.
Return
Parsed Settings object
Parameters
json
The JSON string containing Settings data
Throws
Json Data Exception
if the JSON is malformed or missing required fields
if json parameter is null
// Sample usage of parser to parse settings JSON.
val parser = Parser()
val json: String = File("your-file.json").bufferedReader().readText()
val settings: Settings = parser.parseSettings(json)
Content copied to clipboard
Parse JSON buffered source to Settings object.
This method efficiently parses Google Takeout Settings.json data using cached adapters and is recommended for large files as it provides better I/O performance.
Return
Parsed Settings object
Parameters
buffered Source
The BufferedSource containing Settings JSON data
Throws
Json Data Exception
if the JSON is malformed or missing required fields
if bufferedSource parameter is null
// Sample usage of parser to parse settings JSON.
val parser = Parser()
val bufferedSource: BufferedSource = File("your-file.json").source().buffer()
val settings: Settings = parser.parseSettings(bufferedSource)
Content copied to clipboard