parseKnownPayload function
Parse payload and return KnownPayload or throws error
Implementation
Future<KnownPayload?> parseKnownPayload(String payload) async {
final res = await createLib().parseKnownPayload(payload: payload);
final decoded = jsonDecode(res);
if (decoded == null) return null;
return KnownPayload.fromJson(decoded);
}