René's URL Explorer Experiment


Title: Better YAML Front Matter parsing · Issue #391 · commonmark/commonmark-java · GitHub

Open Graph Title: Better YAML Front Matter parsing · Issue #391 · commonmark/commonmark-java

X Title: Better YAML Front Matter parsing · Issue #391 · commonmark/commonmark-java

Description: Is your feature request related to a problem? Please describe. I'm building a project, where the important part is parsing the YAML front matter in Markdown documents and map it to known DTO-s. I experienced multiple issues with the exis...

Open Graph Description: Is your feature request related to a problem? Please describe. I'm building a project, where the important part is parsing the YAML front matter in Markdown documents and map it to known DTO-s. I e...

X Description: Is your feature request related to a problem? Please describe. I'm building a project, where the important part is parsing the YAML front matter in Markdown documents and map it to known DTO-s....

Opengraph URL: https://github.com/commonmark/commonmark-java/issues/391

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better YAML Front Matter parsing","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nI'm building a project, where the important part is parsing the YAML front matter in Markdown documents and map it to known DTO-s. I experienced multiple issues with the existing front matter extension for commonmark:\n\n * it supports only a small subset of YAML, unsuitable for my needs,\n * it produces the data structure that breaks Jackson when trying to map it to a DTO. The main issue is that `key: value` pair is mapped to a list with a single value. It also does not support other data types.\n\n**Describe the solution you'd like**\n\nI think that it would work much better, if YAML parsing were delegated to an external library. The extension could simply allow to \"bring your own parser\" via an interface to implement. In case of Jackson, this translates to calling a single method on `ObjectMapper`:\n\nPseudo-code that illustrates the idea:\n\n```java\npublic class JacksonWrapper implements YamlParserProvider {\n   private final ObjectMapper objectMapper;\n   \n   public JacksonWrapper(ObjectMapper objectMapper) {\n      this.objectMapper = objectMapper;\n   }\n\n   public Map\u003cString, Object> parseYaml(String input) {\n      return objectMapper.readValue(input, Map.class);\n   }\n}\n\n// ...\nvar parser = Parser.builder()\n   .extensions(List.of(YamlFrontMatterExtension(JacksonWrapper(objectMapper))))\n   .build();\n```\n\nIn this way, commonmark does not have to have a dependency on any particular YAML parser.\n\nReturning `Map\u003cString, Object>` is IMHO good enough, because I can later use Jackson to map it to the proper DTO in my logic.\n\n**Describe alternatives you've considered**\n\nCurrently, I wrote a simple custom extension on my own. The thing that I don't have yet is better error handling, but the approach seems to work. But I would be happy, if such an extension were a part of Commonmark (less boilerplate code to maintain).\n\nI briefly considered Commonmark to improve the parser in the existing extension, but I quickly realized that this is a complex task.\n","author":{"url":"https://github.com/zyxist","@type":"Person","name":"zyxist"},"datePublished":"2025-08-07T10:43:32Z","url":"https://github.com/commonmark/commonmark-java/issues/391"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:18464b9d-c8d4-2c9c-1a91-651418113122
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB9CE:33F13D:2BE49C:3BCF7D:6AFBB250
html-safe-nonce841296c5ac39968b9c3e1158fa9454171922ccdb082877266bb264b05859394c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUNFOjMzRjEzRDoyQkU0OUM6M0JDRjdEOjZBRkJCMjUwIiwidmlzaXRvcl9pZCI6IjY0MDQ5MzEwMzkyMDk5NjAwMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc14433a2b77fe4517c26b5ac638975052a3e0b36ba974a9f70bb8d52655fad6f
hovercard-subject-tagissue:3299970681
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commonmark/commonmark-java/391/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f6f95834cc94eea12cde335d75e2277b78035d68ce800b6a6ec0cadaa173bcdc/commonmark/commonmark-java/issues/391
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f6f95834cc94eea12cde335d75e2277b78035d68ce800b6a6ec0cadaa173bcdc/commonmark/commonmark-java/issues/391
og:image:altIs your feature request related to a problem? Please describe. I'm building a project, where the important part is parsing the YAML front matter in Markdown documents and map it to known DTO-s. I e...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezyxist
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
go-importgithub.com/commonmark/commonmark-java git https://github.com/commonmark/commonmark-java.git
octolytics-dimension-user_id8661225
octolytics-dimension-user_logincommonmark
octolytics-dimension-repository_id39477878
octolytics-dimension-repository_nwocommonmark/commonmark-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id39477878
octolytics-dimension-repository_network_root_nwocommonmark/commonmark-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4cce0e99cf61481a318ff12c2e8580153a6c7c6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/commonmark/commonmark-java/issues/391#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommonmark%2Fcommonmark-java%2Fissues%2F391
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommonmark%2Fcommonmark-java%2Fissues%2F391
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commonmark%2Fcommonmark-java
Reloadhttps://github.com/commonmark/commonmark-java/issues/391
Reloadhttps://github.com/commonmark/commonmark-java/issues/391
Reloadhttps://github.com/commonmark/commonmark-java/issues/391
commonmarkhttps://github.com/commonmark
commonmark-javahttps://github.com/commonmark/commonmark-java
Codehttps://github.com/commonmark/commonmark-java
Issues9 (9)https://github.com/commonmark/commonmark-java/issues
Pull requests4 (4)https://github.com/commonmark/commonmark-java/pulls
Actionshttps://github.com/commonmark/commonmark-java/actions
Wikihttps://github.com/commonmark/commonmark-java/wiki
Security and quality8 (8)https://github.com/commonmark/commonmark-java/security
Insightshttps://github.com/commonmark/commonmark-java/pulse
https://github.com/commonmark/commonmark-java
New issuehttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/391
New issuehttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/391
Better YAML Front Matter parsinghttps://github.com/commonmark/commonmark-java/issues/391#top
enhancementhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
help wantedhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com/zyxist
zyxisthttps://github.com/zyxist
on Aug 7, 2025https://github.com/commonmark/commonmark-java/issues/391#issue-3299970681
zyxisthttps://github.com/zyxist
enhancementhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Aug 7, 2025https://github.com/commonmark/commonmark-java/issues/391#event-19032530665
zyxisthttps://github.com/zyxist
on Aug 7, 2025https://github.com/commonmark/commonmark-java/issues/391#event-19032594257
https://github.com/robinst
robinsthttps://github.com/robinst
on Aug 18, 2025https://github.com/commonmark/commonmark-java/issues/391#issuecomment-3196198408
https://github.com/zyxist
zyxisthttps://github.com/zyxist
on Aug 19, 2025https://github.com/commonmark/commonmark-java/issues/391#issuecomment-3200327525
https://github.com/robinst
robinsthttps://github.com/robinst
on Sep 10, 2025https://github.com/commonmark/commonmark-java/issues/391#issuecomment-3274823733
robinsthttps://github.com/robinst
help wantedhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
on Dec 7, 2025https://github.com/commonmark/commonmark-java/issues/391#event-21407432487
https://github.com/zyxist
zyxisthttps://github.com/zyxist
on Aug 1, 2026https://github.com/commonmark/commonmark-java/issues/391#issuecomment-5151487352
https://yaml.org/spec/1.2.2/#732-single-quoted-stylehttps://yaml.org/spec/1.2.2/#732-single-quoted-style
https://github.com/zyxist
zyxisthttps://github.com/zyxist
on Aug 5, 2026https://github.com/commonmark/commonmark-java/issues/391#issuecomment-5187502864
#445https://github.com/commonmark/commonmark-java/pull/445
zyxisthttps://github.com/zyxist
completedhttps://github.com/commonmark/commonmark-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 5, 2026https://github.com/commonmark/commonmark-java/issues/391#event-28987946707
https://github.com/robinst
robinsthttps://github.com/robinst
on Aug 6, 2026https://github.com/commonmark/commonmark-java/issues/391#issuecomment-5204031904
https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0300---2026-08-06https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0300---2026-08-06
Sign up for freehttps://github.com/signup?return_to=https://github.com/commonmark/commonmark-java/issues/391
Sign in to commenthttps://github.com/login?return_to=https://github.com/commonmark/commonmark-java/issues/391
enhancementhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
help wantedhttps://github.com/commonmark/commonmark-java/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.