-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow reading / writing comments #18
Comments
I did something similar for another app once (it was regex tho): |
Any news on this @shravan2x? my app is depending on it :c |
I didn't realize it was blocking, I'll work on it this weekend. But can't you just save without the comments?
I can't use Regex for performance reasons. |
In my case the comments are used as "Disabled Entries" and they would be lost and had to be recreated |
@Bluscream Which of the following types of comments do you plan to use? // Comment type A (at the start of the file)
"root"
{
// Comment type B (as a child to an object)
key1 "value1"
"key2" // Comment type C (to the right of a property name)
{
"key3" "value3" // Comment type D (to the right of a property value)
}
}
// Comment type E (at the end of the file) Would it suffice if deserializing then re-serializing this file resulted in this? "root"
{
// Comment type B (as a child to an object)
"key1" "value1"
"key2"
{
"key3" "value3"
// Comment type D (to the right of a property value)
}
} |
Only B is important to me when serializing but i think when deserializing it might be good to be able to get the others aswell |
I've built support for comments locally, I plan to commit them to the repo in the next few days and then release
There are challenges associated with supporting the others, especially A and E (until #23 is resolved, there's no place to store these comments). I'll leave this issue open and revisit it after #23. But hopefully, support for B and D will unblock you. |
Resolved with 0855a05, I'll push 0.6.0 soon. Note that this update includes a breaking change - |
Fyi to create a comment from code you do |
When is this pushed to nuget so i can use it in production? |
Sorry, I'm polishing some other NRT issues on VObject because otherwise they'd become breaking changes in 0.7.0 (which I plan to add support for conditionals in). I'll push it tomorrow. |
@Bluscream |
I might pick the project back up soon, so thanks <3 |
It would be nice if the parser would try to parse commented lines and fallback to just storing them as strings when parsing fails (a regular comment)
Sent from my TAB 2 A10 using FastHub
The text was updated successfully, but these errors were encountered: