Support for Canonicalization (Sorting)
See original GitHub issueUsing canonicalization, it becomes very simple adding a digital signature to a JSON object: https://github.com/cyberphone/json-canonicalization/tree/master/dotnet/json.net.sign
I have skimmed the code and it “seems” that the least intrusive change would be to add one field to Netwonsoft.Json.Formatting
.
The suggested change would introduce the following algorithm: https://cyberphone.github.io/doc/security/draft-rundgren-json-canonicalization-scheme.html#json.sorting.properties
It would be sufficient calling this formatting mode Sorted
since there are other things needed for full-blown I-JSON compatible signature support.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8
Top Results From Across the Web
How to specify a canonical with rel="canonical" and other ...
To specify a canonical URL for duplicate or very similar pages to Google Search, you can indicate your preference using a number of...
Read more >What is URL Canonicalization | Google Search Central
Consequently, a canonical URL is the URL of a page that Google chose as the most representative from a set of duplicate pages....
Read more >How to handle sorting, filtering, and pagination in ...
If an index page can be filtered many different ways, the unfiltered version should be referenced as the canonical on each, and a...
Read more >Canonical link for sorting topics pages
1 Answer. With the two examples posted as there are many paginated pages and you are sorting by variables which change the content...
Read more >Canonicalization
In this context, canonicalization is the process of translating every string character to its single valid byte sequence. An alternative to canonicalization is ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, everyone! First of all, thanks for opening this issue, @cyberphone (and for the linked library).
I do believe adding a canonical formatter would be extremely helpful, specifically when trying to sign JSON files, and I agree that @cyberphone’s suggestion of adding a new formatter in the enum.
@JamesNK - is this something we want to add in a future release? However, if that is not the case, what would be the best way to pass a custom formatter when serializing? (not a contract resolver).
Thank you for the recommendation.