Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pure JSON code #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

BigBlueHat
Copy link

JSON5 is cool for what it is, but not sure it's a mandatory requirement for this package--and having it "in the way" was meaning lots of build overhead to use kle-serial in a browser.

Consequently, these two commits...

  1. Remove JSON5 as a dependency.
  2. Remove the .parse() method altogether as it can (should?) be done at an application layer if/when needed (+/- JSON5 support if that's wanted).

This then focuses this library on just deserialization. Huzzah! 😀

Thanks for building this and KLE!
🎩

Folks wanting JSON5 handling for their data can
add that in their application layer. This removes
the one dependency this project had, making it much
more sustainable, simpler, and faster. Huzzah!
kle.Serial.deserialize(JSON.parse(`[]`)) is equivalent now.
@haversnail
Copy link

+1 to this; seems like a good candidate for a major version bump as well so folks who were dependent on .parse can still use it, while new apps (like mine) can take advantage of the reduced bundle size.

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.

2 participants