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

feat: Add support for serde behind feature flag #65

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

Conversation

strykejern
Copy link

What kind of change does this PR introduce?

Add support for serde behind feature flag for insert, upsert and update
Might fix #35

What is the current behavior?

Library only supports body where type is Into<String>

What is the new behavior?

When enabling the feature flag "serde", the body parameter for the mentioned functions should now be serde::Serialize

Additional comments

I have tried to make the serde functionality "opt-in", which should mean that by default we keep the old functionality.

@soedirgo
Copy link
Collaborator

Thanks! Can you make it use the json optional feature from reqwest instead? That avoids depending on serde directly.

@strykejern
Copy link
Author

Thanks! Can you make it use the json optional feature from reqwest instead? That avoids depending on serde directly.

I can't see that reqwest exports the necessary traits and functions from serde for us to use it in these functions? Maybe I'm misunderstanding the suggestion, but I think we need to depend on serde for this to work. As I wrote above; this implementation should only depend on serde if the serde feature is enabled.

Are you also suggesting to use the .json() function in the build() function in Builder?

Am I understanding your comment correctly?

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.

Support json as parameter
2 participants