export function parseJsonValue(value: unknown, fallback: unknown = null): unknown {
  if (value == null || value === "") return fallback;
  if (typeof value !== "string") return value;
  try {
    return JSON.parse(value);
  } catch {
    return fallback;
  }
}
