question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Canonicalization (Sorting)

See original GitHub issue

Using 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:open
  • Created 5 years ago
  • Reactions:5
  • Comments:8

github_iconTop GitHub Comments

2reactions
radu-mateicommented, Feb 2, 2019

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).

0reactions
drauchcommented, Apr 18, 2020

Thank you for the recommendation.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found