pub fn normalize_json_value(value: Value) -> ValueExpand description
Helper function to normalize AST JSON into a form compatible with TGC.
This function traverses the original JSON value and produces a new one under the following rules:
- Remove empty object mappings from JSON arrays.
- If a JSON array contains exactly two elements and one is an empty object mapping while the other is not, lift the non-empty element.