GitHub user kyungjunleeme created a discussion: Is the `json` override in 
`airflow_local_settings.py` still relevant?



Hello. I’m wondering if this approach 
https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/dag-serialization.html#using-a-different-json-library

is still relevant or useful in real-world Airflow deployments.

## Why it might have limited value

1. **Limited scope** – This override only affects Airflow components that 
import `json` from `airflow_local_settings`. Many operators, hooks, and 
provider packages import Python’s built-in `json` module directly, so they 
wouldn’t be impacted.

2. **Minimal performance gains** – In most Airflow environments, performance 
bottlenecks are related to I/O (e.g., DB queries, network calls, XCom storage) 
rather than JSON parsing speed. Switching to something like `ujson` may not 
yield noticeable improvements.

3. **Compatibility risks** – Alternative libraries can behave differently 
(e.g., handling of `datetime`, `Decimal`, `NaN`), which might cause subtle bugs 
or inconsistencies, especially in XCom serialization.

## Questions for the community

- Is this override mechanism still actively used or tested in Airflow core?
- Should we consider clarifying in the docs that it only affects a limited part 
of the codebase?
- Would it make sense to deprecate this recommendation in favor of patching 
JSON handling directly in custom hooks/operators if needed?

I’d love to hear thoughts from the community and maintainers.  
If the consensus is that this is no longer valuable, perhaps we could update 
the docs to reflect that.

GitHub link: https://github.com/apache/airflow/discussions/54387

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to