fixed data path quoting in array issue
This commit is contained in:
parent
a2694af70f
commit
5fd11daf15
1 changed files with 4 additions and 3 deletions
|
|
@ -69,10 +69,11 @@ public class DataNodePath {
|
|||
} else if (operator == '.') {
|
||||
pathList.add(new NamedChildPathEntity(buffer.toString()));
|
||||
} else if (operator == '[') {
|
||||
if (buffer.charAt(0) == '\'' && buffer.charAt(buffer.length()-1) == '\'')
|
||||
pathList.add(new NamedChildPathEntity(StringUtil.trim(buffer.toString(), '\'')));
|
||||
String str = buffer.toString();
|
||||
if (StringUtil.isNumber(str))
|
||||
pathList.add(new IndexChildPathEntity(Integer.parseInt(str)));
|
||||
else
|
||||
pathList.add(new IndexChildPathEntity(Integer.parseInt(buffer.toString())));
|
||||
pathList.add(new NamedChildPathEntity(str));
|
||||
}
|
||||
|
||||
buffer.delete(0, buffer.length());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue