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

Make prn/pr-str etc write EDN instead of JSON #444

Open
borkdude opened this issue Dec 16, 2023 · 4 comments
Open

Make prn/pr-str etc write EDN instead of JSON #444

borkdude opened this issue Dec 16, 2023 · 4 comments

Comments

@borkdude
Copy link
Member

prn/pr-str etc are totally broken right now I would say since JSON.stringify just silently drops stuff. Also you can't copy-paste printed objects back into the code.

@jacoobes
Copy link

jacoobes commented Nov 20, 2024

is this issue still open? @borkdude , i can take a shot at it.

@borkdude
Copy link
Member Author

Yeah, worth a shot. Perhaps https://github.com/jorinvo/edn-data is a good starting point as well. One concern would be the size that it adds to squint programs that don't use prn

@jacoobes
Copy link

jacoobes commented Nov 20, 2024

https://packagephobia.com/[email protected]
if i included the package, it would add 28.6kb at most (without accounting for treeshaking),

ill investigate what to do.

@jacoobes
Copy link

I couldn't finish this, so ill leave but I have some progress. Below is a browser compatible edn parser ( not fully tested)
https://gist.github.com/jacoobes/dfd524dff2ab314a6b44e9384072bf50

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

No branches or pull requests

2 participants