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

WIP: Serde support #83

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

WIP: Serde support #83

wants to merge 11 commits into from

Conversation

tailhook
Copy link
Contributor

@tailhook tailhook commented Jun 6, 2017

This is just a skeleton code for #82

Currently, it's mostly unimplemented I'm sharing it with you so you can take a glance and give some recommendations before I've written tons of boilerplate code.

The major issue is error handling. Currently, we panic on error because can't propagate it through ToLua trait.

It uses quick_error for reducing boilerplate for errors, I can remove it if you wish. Also, now I see that I should reformat code to 2-space indent, but that's an easy part.

@tailhook
Copy link
Contributor Author

tailhook commented Jun 6, 2017

Okay, now it supports enough to serialize any Json. Other things are not obvious how to serialize properly (like tuple structs and similar).

@SpaceManiac
Copy link
Contributor

serde_json treats tuple structs just like sequences. I think it would be reasonable to do the same.

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