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

Any idea to support obj type or dynimac object? #104

Open
darting opened this issue Apr 11, 2018 · 2 comments
Open

Any idea to support obj type or dynimac object? #104

darting opened this issue Apr 11, 2018 · 2 comments

Comments

@darting
Copy link

darting commented Apr 11, 2018

Lets say, I have a type

type Event<'State> = {
    ID : string    
    State : 'State
    CreatedTime : DateTime
}

And after I pickler.PickleToString then I store to database. I have another service load event data from database and do aggregation. But the problem is, I dont know what will be the exactly type of the State (and I dont use it in this case also). Is there any way just ignore the type?

I tried pickler.UnPickleOfString<Event<obj>> not working.

Thanks

@eiriktsarpalis
Copy link
Member

Let me first say that using this library for storing data is not recommended. You can achieve what you need be serializing and deserializing using obj as your type parameter, however this will only work provided you have also serialized using obj.

@darting
Copy link
Author

darting commented Apr 12, 2018

Ah thanks @eiriktsarpalis

Any recommend lib for serialize and store data to database? Newtonsoft Json.NET?

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