feat(type,jer): implement Encode/Decode on serde_json::Value#538
Open
mkatychev wants to merge 7 commits intolibrasn:mainfrom
Open
feat(type,jer): implement Encode/Decode on serde_json::Value#538mkatychev wants to merge 7 commits intolibrasn:mainfrom
serde_json::Value#538mkatychev wants to merge 7 commits intolibrasn:mainfrom
Conversation
mkatychev
commented
Feb 13, 2026
| const IS_CHOICE: bool = true; | ||
| } | ||
|
|
||
| impl crate::types::Choice for Value { |
Contributor
Author
There was a problem hiding this comment.
I'm fairly new/clueless as to the ASN.1 standard and am not sure if there anything from X.697 that can be used in this approach though the CHOICE type seemed best to mirror the serde_json::Value enum.
mkatychev
commented
Feb 13, 2026
| } | ||
|
|
||
| // ============================================================ | ||
| // Test cases adapted from serde-json-canonicalizer https://github.com/evik42/serde-json-canonicalizer |
Contributor
Author
There was a problem hiding this comment.
part of motivation is that json canonicalization is not available in no_std
serde_json::Valueserde_json::Value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Structs like this will faild to derive since
serde_json::Value(despite being used in the jer module) does not implement Encode/Decode/AsnType:Used choice type to implement said traits for
serde_json::Value.