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

HJSON support #29

Open
Gelbpunkt opened this issue Apr 12, 2021 · 3 comments
Open

HJSON support #29

Gelbpunkt opened this issue Apr 12, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Gelbpunkt
Copy link
Contributor

Gelbpunkt commented Apr 12, 2021

Hi there, I'm looking to potentially use nanoserde because my projects are tiny and only pull in syn (and the like) via serde-derive. The bummer is that I use HJSON for my config files and therefore need a HJSON deserializer (currently I use deser_hjson).
Would it be possible to add support for HJSON to nanoserde?

Links:
HJSON homepage
Test cases

@not-fl3
Copy link
Owner

not-fl3 commented Apr 12, 2021

Hjson looks interesting, however, I am not personally interested in it enough to implement the parser myself.

Adding HJSON support looks very doable though - from first glance, HJSON looks pretty similar to RON, so parse may share a lot of implementation details with RON

@Gelbpunkt
Copy link
Contributor Author

I can try to see what I can do to port the HJSON implementation to nanoserde myself. Do you have any hints for implementing a new parser with nanoserde for me to tackle it? I'm new to writing custom deserializers and deser_hjson has things like EnumAccess traits from serde which don't seem to have an equivalent in nanoserde (or I am blind?).

@not-fl3
Copy link
Owner

not-fl3 commented Apr 12, 2021

I would recommend checking nanoserde's ron parser instead of serde's stuff - nanoserde is too different internally and most concepts would not map 1 by 1 from serde to nanoserde

@not-fl3 not-fl3 added the enhancement New feature or request label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants