Skip to main content

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

NameTypeDescription
input_stringstringThe raw string or partial key name provided by the user to be matched.
known_keyslist[string]A collection of valid, existing JSON keys to search against for a match.

Returns

TypeDescription
stringThe best-matching key from the known set that corresponds to the input string.