pub fn normalize_json_value(value: Value) -> Value
Expand description

Helper function to normalize AST JSON into a form compatible with tgc. This function will traverse the original JSON value and produce a new one under the following rules:

  1. Remove empty object mappings from JSON arrays
  2. If there are two elements in a JSON array and one is an empty object mapping and the other is not, then lift up the one that isn’t