langchain/callbacks/tracers/stdout.py/try_json_stringify
def try_json_stringify(obj: Any, fallback: str) -> str:
    try:
        return json.dumps(obj, indent=2)
    except Exception:
        return fallback