-
Notifications
You must be signed in to change notification settings - Fork 20
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
Marshal function #8
Comments
Yeah... You know what? I'll look into it. Thanks! |
maybe put in tags? |
Yes it has to be done with tags but how would the syntax be? Just like PS: I haven't worked with tags yet. Will have to take a look on how they work to finalize a syntax. Thanks for your interest 😊. |
Please look at that tag. This is not difficult. :) This will reduce a speed, but comments are usually needed in the configuration file, in which case this is not critical. I liked your idea! |
Thanks! But could you please tell:
{
"key": "value" // comment here (my preference)
} OR {
// comment here
"key": "value"
} |
|
I know I'm late, but just around this time I wrote a go module that does exactly what you need and its MIT licensed. It is not based on tags, but on parsing the abstract syntax tree of the go source. Distinguishes both documentation blocks and inline comments, and reads any default values specified in a method with a specific signature (see the readme). If you think it could be useful, use it freely and let me know what you think: https://github.com/marco-sacchi/go2jsonc Note that go2jsonc is a static analysis / generator tool and its not reflection based, so you need to specify the package path and type name, not the package import string. |
Please take the next step: Marshal function ...
The text was updated successfully, but these errors were encountered: