Skip to content

Return null when value not found#9

Merged
janl merged 1 commit into
janl:masterfrom
hildjj:master
Jan 20, 2013
Merged

Return null when value not found#9
janl merged 1 commit into
janl:masterfrom
hildjj:master

Conversation

@hildjj

@hildjj hildjj commented Jan 20, 2013

Copy link
Copy Markdown
Contributor

Throwing an exception is for exceptional cases. Not finding the target data doesn't feel like an exceptional case, particularly if I'm going to use the pointer as a filter to select from a set of objects that might match.

…d, but the doc does not contain the given value.
@janl

janl commented Jan 20, 2013

Copy link
Copy Markdown
Owner

Agreed.

Note to self. this breaks BC and we must bump to version 2.x.y.

janl added a commit that referenced this pull request Jan 20, 2013
Return null when value not found
@janl janl merged commit 99a7865 into janl:master Jan 20, 2013
@hildjj

hildjj commented Jan 20, 2013

Copy link
Copy Markdown
Contributor Author

Agree with BC issue. Wait for compile patch before releasing 2.x though?

@janl

janl commented Jan 20, 2013

Copy link
Copy Markdown
Owner

Can do, but no biggie, I am fast and loose with major version numbers, I wouldn’t mind shipping 2.0.0 tonight and 3.0.0 tomorrow ;)

I’ll play it by ear if anyone wants this in a release asap, if not it can wait.

@benatkin

Copy link
Copy Markdown
Contributor

I can use this fix. What's the compile patch?

@janl

janl commented Jun 14, 2013

Copy link
Copy Markdown
Owner

hm?

@benatkin

Copy link
Copy Markdown
Contributor

It was @hildjj that said "Wait for compile patch before releasing 2.x though?"

Another note, it ought to return undefined rather than null. That would be a convenient way to differentiate between finding "null" and not finding the key at all.

@hildjj

hildjj commented Jun 15, 2013

Copy link
Copy Markdown
Contributor Author

I was talking about hildjj/node-jsonpointer@1c373d5

@janl

janl commented Jun 15, 2013

Copy link
Copy Markdown
Owner

@benatkin good point, wanna open a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants