Skip to content

Pure JSON code#12

Open
BigBlueHat wants to merge 2 commits intoijprest:masterfrom
BigBlueHat:pure-json-code
Open

Pure JSON code#12
BigBlueHat wants to merge 2 commits intoijprest:masterfrom
BigBlueHat:pure-json-code

Conversation

@BigBlueHat
Copy link
Copy Markdown

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
Copy Markdown

+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.

@dcunited001
Copy link
Copy Markdown

i think the rational here was to avoid typing

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