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_json::Value #312

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

Conversation

larry0x
Copy link

@larry0x larry0x commented Oct 3, 2024

Implement BorshSerialize and BorshDeserialize for serde_json::Value.

This is useful, for example, if a program is to take an arbitrary JSON as input (as Value), and store it as raw bytes.

We found that for this use case, borsh produces much more compact bytes, is faster, and results in smaller program size, compared to using JSON strings.

Thank you!

@larry0x
Copy link
Author

larry0x commented Oct 3, 2024

Some workflows fail, but they don't seem to be related to my code...

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.

1 participant