android-components / mozilla.components.service.pocket / PocketJSONParser

PocketJSONParser

class PocketJSONParser (source)

Holds functions that parse the JSON returned by the Pocket API and converts them to more usable Kotlin types.

Functions

Name Summary
jsonToGlobalVideoRecommendations fun jsonToGlobalVideoRecommendations(jsonStr: String): List<PocketGlobalVideoRecommendation>?

Companion Object Properties

Name Summary
KEY_VIDEO_RECOMMENDATIONS_INNER const val KEY_VIDEO_RECOMMENDATIONS_INNER: String

Companion Object Functions

Name Summary
newInstance fun newInstance(): PocketJSONParser
Returns a new instance of PocketJSONParser.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.