otalk/jxt

Why not to include false attrs in JSON?

Opened this issue · 2 comments

https://github.com/otalk/jxt/blob/master/lib/stanza.js#L104

On this line we have: else if (val !== undefined && val !== false && val !== '') , but what if my value is false and i need it?

Ran into this here as well.

Obvious workaround is to use string false.

Would the changes suggested by @sarumjanuch be of interest?

See #11. Once the tests in stanza.io are passing with this change, I'll merge it.