json5DecodeParser function

Data? json5DecodeParser({
  1. required Parser parser,
  2. required Data parentData,
  3. required bool debug,
})

Implementation

Data? json5DecodeParser({
  required Parser parser,
  required Data parentData,
  required bool debug,
}) {
  printLog("----------------------------------", debug, color: LogColor.yellow);
  printLog(
    "ID: ${parser.id} Parser: JSON 5 Decode",
    debug,
    color: LogColor.cyan,
  );
  try {
    return Data(parentData.url, JSON5.parse(parentData.obj as String));
  } catch (e) {
    printLog(
      "JSON5Decode Parser: $e",
      debug,
      color: LogColor.red,
    );
    return null;
  }
}