DirectRawPredictRequest.fromJson constructor

DirectRawPredictRequest.fromJson(
  1. Object? j
)

Implementation

factory DirectRawPredictRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return DirectRawPredictRequest(
    endpoint: switch (json['endpoint']) {
      null => '',
      Object $1 => decodeString($1),
    },
    methodName: switch (json['methodName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    input: switch (json['input']) {
      null => Uint8List(0),
      Object $1 => decodeBytes($1),
    },
  );
}