convertExportJsonFromString function

String convertExportJsonFromString(
  1. String? str
)

Converts a nullable JSON string into a non-nullable JSON string representing an ExportModel.

If the input string is null or empty, this function returns an empty string. Otherwise, it decodes the string into an ExportModel object using exportModelFromJson, and then serializes the object back into a JSON string using exportModelToJson.

str: The nullable JSON string to convert.

Returns a non-nullable JSON string.

Implementation

String convertExportJsonFromString(String? str) => (str == null || str.isEmpty)
    ? ""
    : exportModelToJson(exportModelFromJson(str));