normalizeJsonPath function

String normalizeJsonPath(
  1. String rawPath
)

Normalizes a user-supplied JSON path expression into a canonical representation starting with $.

Implementation

String normalizeJsonPath(String rawPath) {
  final stripped = _stripJsonPathWrapper(rawPath);
  final tokens = _tokenizeJsonPath(stripped);
  return _buildNormalizedJsonPath(tokens);
}