pub fn json_path_to_object_key(jsonpath: &str) -> String
Expand description

Function to generate valid ObjectKey accessor from JSONPath.

The generated accessor can be used as a part of processor function. This accessor is an interpreted version of JSONPath, which speeds up the processing.

let string = json_path_to_object_key("$[0].phoneNumbers[1][test].type");
assert_eq!("&[Index(0), Key(\"phoneNumbers\".to_string()), Index(1), Key(\"test\".to_string()), Key(\"type\".to_string())]", string);