Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support JSON comments #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bennycode
Copy link

To make resumed the most convenient resume builder for developers, I implemented support for comments in JSON! 💫

Use-Case:

There are certain properties in my CV that I prefer not to render, so I occasionally comment out less important details. For example:

        {
            "highlights": [
                "Millions of sites use the CDN in production",
                "Larger market share than Yahoo's, Microsoft's and Google's javascript content distribution networks",
                "We serve hundreds of billions request a month",
                "Contains over 3000 popular Javascript libraries",
                "Millions of developers visit the site per year"
            ],
            "description": "Following Google's CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.",
            "website": "http://www.cdnjs.com",
            "name": "Cdnjs",
            "startDate": "2011-01-08"
        }
    ],
    // "languages": [
    //     {
    //         "language": "English",
    //         "fluency": "Native speaker"
    //     }
    // ],

Without my PR, this would break the rendering process:

SyntaxError: Expected double-quoted property name in JSON
at JSON.parse

Using JSON5, we can support JSON that has comments inside. It may also be useful for people who just want to add comments to specific sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant