exposeJSON method

String exposeJSON(
  1. JSONString jsonString, {
  2. LogMethods? method = .prettyPrint,
})

Implementation

String exposeJSON(
  JSONString jsonString, {
  LogMethods? method = .prettyPrint,
}) {
  JSONString j = jsonString;
  switch (method) {
    case .removeEmpty:
      j = removeEmpty(jsonString);
    case .prettyPrint:
      j = prettyPrint(jsonString);
    case .removeEmptyThenPrettyPrint:
      j = prettyPrint(removeEmpty(jsonString));
    case _:
  }
  print(j);
  return j;
}