Closed KES777 closed 2 years ago
Thanks for that ideas. I know this jquery plugin, as i've used it before i've created this library. But, i am not a fan of any data-* property annotations to modify the behaviour of this library. So i must decline that.
The other thing with empty fields, this could already be done with the "inputFilter" option. The idea was to create a generic filter option to allow the user to do everything. Creating "aliases/shorthand" functions/helpers for existing features is not a thing i tend to do in my libraries. It just boils up the codebase with no real advantage other than making calls "shorter".
But to the empty fields, maybe this could be a thing, as there are already similar options like includeDisabled
. I think about that.
modify the behavior of this library
So I should write some extra code to reprocess resulting hash. ok ;-)
Actually any library is a short cut for some task. So it is OK if library ship with it frequently used tools. So developers will not reinvent the wheel.
I agree with your notice that includeDisabled
is shorthand for core inputFilter
feature. And this is cool when developer could just say: I want to use this, that or those filters.
Thank you.
Actually any library is a short cut for some task.
Yep, that's true.
As a library maintainer, it's sometimes hard to make decisions that satisfy all needs equally. Every developer has ideas how things should or can be done. Many of them are personal preference, for sure. I love to hear about that ideas and discus them, as we currently do hear.
Thanks for that feedback.
A new pre-release does exist. https://github.com/brainfoolong/form-data-json/releases from branch https://github.com/brainfoolong/form-data-json/tree/v2-dev - Maybe you give it a shot. I took your feedback into consideration and refactored the hole thing as it has a few flaws that i didn't liked.
Is your feature request related to a problem? Please describe. https://github.com/marioizquierdo/jquery.serializeJSON#include-unchecked-checkboxes Idea of
data-unchecked-value
is interesting:Also I like the idea to ignore empty fields: https://github.com/marioizquierdo/jquery.serializeJSON#ignore-empty-form-fields