Skip to main content

repair_object_fields

Function repair_object_fields 

Source
pub fn repair_object_fields(
    obj: &mut Map<String, Value>,
    schema: &ObjectSchema,
    path: &str,
    options: &FuzzyOptions,
) -> RepairLog
Expand description

Repair a JSON object using an ObjectSchema

This repairs:

  1. Field names (fuzzy-matched against the schema’s field names)
  2. Field values according to each field’s FieldKind — recursing into nested objects and arrays of objects to any depth

§Collision behavior (first-win)

See repair_fields_with_list. Skipped renames are recorded in the returned log’s skipped list.