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

Support for jsoncpp #291

Closed
lianyant opened this issue May 11, 2023 · 4 comments · Fixed by #317
Closed

Support for jsoncpp #291

lianyant opened this issue May 11, 2023 · 4 comments · Fixed by #317
Milestone

Comments

@lianyant
Copy link

What's your question?

Can we use the jsoncpp library?

Additional Context

I would like to introduce the jwt cpp library into my project and use the jsoncpp library that is already in use in my local project. Is this okay?

@Thalhammer
Copy link
Owner

jsoncpp isn't directly supported in the way that we ship a trait for it, however if it has an api similar to most other JSON libraries out there you should be able to adopt one of the traits in the traits folder pretty easily and then use it instead of the default traits. If you do consider contributing it back by doing a pr (or simply post it under this issue) and we will add it to the official release eventually.

If thats not an option for whatever reason you can use the default picojson library for jwt and jsoncpp for the rest, they shouldn't collide and picojson is fairly light.

@lianyant
Copy link
Author

Due to my unfamiliarity with the jsoncpp library and the fact that its APIs are somewhat different, some types do not exist in jsoncpp library, or the type names are different. So I took your suggestion and used the default picojson library. Thank you very much for your answer. This issue has been resolved.

@prince-chrismc prince-chrismc changed the title question Support for jsoncpp May 11, 2023
@prince-chrismc
Copy link
Collaborator

Glad you are unblocked. I'll leave this open in case other want it too they can chime in and hopefully contribute 🤞

@cjserio
Copy link
Contributor

cjserio commented Dec 9, 2023

I just made a pull request with these traits.
#317

@prince-chrismc prince-chrismc linked a pull request Dec 9, 2023 that will close this issue
@prince-chrismc prince-chrismc added this to the 0.8.0 milestone Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants