parseFieldName function
Parses a field name from a JSON path expression.
Implementation
String parseFieldName(String jsonPath, int index) {
final buffer = StringBuffer();
while (index < jsonPath.length && isUnquotedFieldChar(jsonPath[index])) {
buffer.write(jsonPath[index]);
index++;
}
return buffer.toString();
}