allow interacting with key value pairs via subscription#32
allow interacting with key value pairs via subscription#32FlorianLudwig wants to merge 1 commit into
Conversation
spyoungtech
left a comment
There was a problem hiding this comment.
Thanks for this! It sounds like a great idea for the library 💯
I have just a couple questions/discussion topics on the interface and how it might be most useful to users.
Also, would be good to have some tests for this as well!
|
I think all I need is some tests for this and we should be good to merge. |
|
So, revisiting this, I'm having some doubts about this on account of the fact that duplicate keys are allowed, at least in the abstract model. The same thing is true in Python ast.Dict nodes. Perhaps we can still allow this, but I think the right behavior of this would have to search the key value pairs in reverse order because of the issue of duplicate keys -- that is: the item returned should be the node object for the corresponding value as if the JSONObject were eventually dumped (where the last key overrides any previous keys of the same value). |
example usage: