infer_json_key_known
No overview available.
def infer_json_key_known(
input_string: string,
known_keys: list[string]
) - > string
Infers the most likely JSON key from a set of known keys based on a provided input string. This is used to map fuzzy or partial user input to a specific, valid key within a predefined schema.
Parameters
| Name | Type | Description |
|---|---|---|
| input_string | string | The raw string or partial key name provided by the user to be matched. |
| known_keys | list[string] | A collection of valid, existing JSON keys to search against for a match. |
Returns
| Type | Description |
|---|---|
string | The best-matching key from the known set that corresponds to the input string. |