shouldNestJsonInData function

bool shouldNestJsonInData(
  1. ServerType type
)

Implementation

bool shouldNestJsonInData(ServerType type) {
  if (type case ServerType(typeArguments: [final type])) {
    return shouldNestJsonInData(type);
  }

  if (type case ServerType(isBytes: true)) {
    return false;
  }

  if (type.isStringContent) {
    return false;
  }

  return true;
}