Allow map keys with brackets#45
Conversation
|
yeah... it looks like complete rewrite of now it looks more like parsing state machine // found a field, we need to know if the field is next to a closing bracket,
// if it is then no need to traverse again
// for example: [0].Field
if traversedByBracket {
traversedByBracket = false
lastPos = i + 1
continue
}where we need to skip traversing if |
| // found a field, we need to know if the field is next to a closing bracket, | ||
| // if it is then no need to traverse again | ||
| // for example: [0].Field | ||
| if traversedByBracket { |
There was a problem hiding this comment.
need to skip traversing if . is following ]
s[k]w == s[k].w (extra dot after closing bracket)
|
I need to think about this one a bit to ensure there are no edge cases where Weird Stuff™ happens; I'm a bit nervous about that. I need to get back to this. |
|
@arp242 please apply this pr , we want use this lib in our project and need this fix. |
|
I haven't had the time to look at it yet @stufently, but you can use |
9527da5 to
7600225
Compare
|
updated to recent master resolving conflicts |
fixed #44