fromJson method

NUIMiniProgramSession fromJson(
  1. Map<String, dynamic> json
)

Implementation

NUIMiniProgramSession fromJson(Map<String, dynamic> json){
  String sessionId = json["sessionId"];
  String userId = json["userId"];
  String displayName = json["displayName"];
  List<String> roles = List<String>.from(json["roles"] ?? []);
  Map<String, dynamic> metadata = json["metadata"];
  return NUIMiniProgramSession(
    sessionId: sessionId,
    userId: userId,
    displayName: displayName,
    roles: roles,
    metadata: metadata
  );
}