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.

Make LinkParser extensible.

See original GitHub issue

With #1022 we now have a better default parser and user is able to provide their own parser.

But the LWM2M spec defines some specific grammar for its Attributes. This looks like some kind of link-extension.

So it seems that DefaultLinkParser/LinkParser should be extensible to allow to parse this kind of LinkExtention. Ideally, Link class and Parser should not know about Attribute concept which is a pure LWM2M concept but I guess this is OK if AttributeModel contains a kind of LinkExtensionParser.

Implementing this will probably come with solving some raised issues like :

  • drop the “splitting first” parsing. (more details here and here)
  • better responsability handling about quoted sting/ excaping char / uri normalization (more details)

(Bonus question: Not clear to me but Link Parsing is also related to #1042 which I didn’t think too much for now)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
sbernard31commented, Nov 4, 2021

Sorry for the mess with PR #1141 - I don’t know how to change PR to Draft after creating one.

No problem. For the next time : Capture d’écran de 2021-11-04 15-37-30

0reactions
sbernard31commented, Feb 14, 2022

Thx a lot @Michal-Wadowski for you help 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linkparser
LinkParser analyzes the links of the current page. It can differentiate between 9 link types & mark them in different colors.
Read more >
urllib.parse — Parse URLs into components — Python 3.11.1 ...
The URL quoting functions focus on taking program data and making it safe for use as URL components by quoting special characters and...
Read more >
How to realize parsing of own html tags in text - Stack Overflow
It's working but I need extensibility. Regex is not a good idea, since it's hardcoded. How to realize that task with finite state...
Read more >
sauron package - github.com/TryStreambits/sauron - Go Packages
Sauron is an extensible page parser written in Go. ... Request); func Register(hostName string, parser LinkParser) (regErr error) ...
Read more >
Routing in ASP.NET Core - Microsoft Learn
For example, the following code makes an explicit call to UseRouting : ... Due to the kinds of extensibility provided by routing, ...
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