android-components / mozilla.components.concept.engine.manifest / WebAppManifestParser


class WebAppManifestParser (source)

Parser for constructing a WebAppManifest from JSON.


Name Summary
Result sealed class Result
A parsing result.


Name Summary
<init> WebAppManifestParser()
Parser for constructing a WebAppManifest from JSON.


Name Summary
parse fun parse(json: <ERROR CLASS>): Result
fun parse(json: String): Failure
Parses the provided JSON and returns a WebAppManifest (wrapped in Result.Success if parsing was successful. Otherwise Result.Failure.
serialize fun serialize(manifest: WebAppManifest): <ERROR CLASS>

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.