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

Json serialization #19

Open
nhaberl opened this issue Sep 22, 2021 · 2 comments
Open

Json serialization #19

nhaberl opened this issue Sep 22, 2021 · 2 comments

Comments

@nhaberl
Copy link

nhaberl commented Sep 22, 2021

Is there a way to serialize a Reccurence pattern into Json ?
Reason is that I want to serialize it to a UI and therefore it would be great to expose as json so I can bind directly into any view model.
Additionally it would be a bit more descriptive when passing between borders :)

What do you think ?

@EWSoftware
Copy link
Owner

There's nothing in the iCalendar specifications regarding JSON so I've never addressed it. I don't see any reason it couldn't be serialized to JSON but it would specific to this project. I don't use JSON much and only have a passing familiarity with how things can be structured so I'm not the best one to implement it. Given the properties I'm not sure how you'd be able to serialize them in such as way as to be useful for binding.

@nhaberl
Copy link
Author

nhaberl commented Sep 23, 2021

The use case would be a schedule interface like you have in Microsoft Outlook.
So it would be of benefit to have a native way (from your library) to at least serialize tze helper methods like Weekly, Monthly and son on which are implememted in Reccurence class.

So we cold save the ical string and backbparsing it to a json which handles the web UI .

I have done this by abstracting Reccurence class but had to look in source to get the right integers e.g. when using DayOccurence.

So I thought would be great having rhis native from the llibrary anyhow.

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

No branches or pull requests

2 participants