utahiosmac / Marshal

Marshaling the typeless wild west of [String: Any]
MIT License
697 stars 62 forks source link

Only return `nil` for the same key #82

Closed brentleyjones closed 3 years ago

brentleyjones commented 7 years ago

This is needed in order to prevent errors further down the tree from being swallowed into the nil.

Using stringValue for comparison, since KeyType doesn't conform to Equatable.

bwhiteley commented 7 years ago

Very nice. Can we add a test? Preferably one that fails prior to this change...

brentleyjones commented 7 years ago

Sure. I'll try to get to that tonight. Just submitted this because it was discovered while implementing something with it at work.

jarsen commented 7 years ago

I'm ready to merge this, do we have a test to add?

brentleyjones commented 7 years ago

Sorry, got busy with a holiday week, and now I'm a little swamped with work. Go ahead and leave this unmerged if the tests are required. I'll eventually get to adding them.

jarsen commented 7 years ago

No worries, @brentleyjones. Totally understand. Thanks for the PR. If I get some time soon I'll try to add a test myself and get it merged.