static initializeBudget(budgetJson) {
    // Clone to prevent modifications of original and to deactivate any live properties.
    budgetJson = JSON.parse(JSON.stringify(budgetJson));
    if (!isArrayOfUnknownObjects(budgetJson)) {
      throw new Error('Budget file is not defined as an array of budgets.');
    }

    const budgets = budgetJson.map((b, index) => {
      /** @type {LH.Budget} */
      const budget = {};

      const {path, options, resourceSizes, resourceCounts, timings, ...invalidRest} = b;
      Budget.assertNoExcessProperties(invalidRest, 'Budget');

      budget.path = Budget.validatePath(path);

      if (isObjectOfUnknownProperties(options)) {
        const {firstPartyHostnames, ...invalidRest} = options;
        Budget.assertNoExcessProperties(invalidRest, 'Options property');
        budget.options = {};
        budget.options.firstPartyHostnames = Budget.validateHostnames(firstPartyHostnames);
      } else if (options !== undefined) {
        throw new Error(`Invalid options property in budget at index ${index}`);
      }

      if (isArrayOfUnknownObjects(resourceSizes)) {
        budget.resourceSizes = resourceSizes.map(Budget.validateResourceBudget);
        Budget.assertNoDuplicateStrings(
          budget.resourceSizes.map(r => r.resourceType),
          `budgets[${index}].resourceSizes`
        );
      } else if (resourceSizes !== undefined) {
        throw new Error(`Invalid resourceSizes entry in budget at index ${index}`);
      }

      if (isArrayOfUnknownObjects(resourceCounts)) {
        budget.resourceCounts = resourceCounts.map(Budget.validateResourceBudget);
        Budget.assertNoDuplicateStrings(
          budget.resourceCounts.map(r => r.resourceType),
          `budgets[${index}].resourceCounts`
        );
      } else if (resourceCounts !== undefined) {
        throw new Error(`Invalid resourceCounts entry in budget at index ${index}`);
      }

      if (isArrayOfUnknownObjects(timings)) {
        budget.timings = timings.map(Budget.validateTimingBudget);
        Budget.assertNoDuplicateStrings(
          budget.timings.map(r => r.metric),
          `budgets[${index}].timings`
        );
      } else if (timings !== undefined) {
        throw new Error(`Invalid timings entry in budget at index ${index}`);
      }

      return budget;
    });

    return budgets;
  }
More info on the Budget format:
https://github.com/GoogleChrome/lighthouse/issues/6053#issuecomment-428385930
@param {unknown} budgetJson
@return {Array<LH.Budget>}