Git Product home page Git Product logo

Comments (10)

inethui avatar inethui commented on September 26, 2024

Also, does Aqla support IReadOnlyDictionary, IReadOnlyCollection, IReadOnlySet?

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

You are right, they must be supported. They simply did not exist at the time of active development of AqlaSerializer. I'm going to add support for them some time later.

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

The complicated thing here is that non generic ICollection doesn't have an Add method so I had to use IList.

from aqlaserializer.

inethui avatar inethui commented on September 26, 2024

Is there any updates on this issue? When can we get the solution for it?

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

It turned out to be easier than I thought. I already have a working implemention of ISet support.

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

I uploaded a new version with all these interfaces supported. Please confirm that it works on your side.

from aqlaserializer.

inethui avatar inethui commented on September 26, 2024

It works at interface level. However, what I serialized type is different from the deserialized type:
System.Collections.ObjectModel.ReadOnlyCollection -> System.Collections.Generic.List
System.Collections.ObjectModel.ReadOnlyDictionary<string, int> -> System.Collections.Generic.Dictionary<string, int>

Is it possible to deserialize back the same type as serialized?

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

No, but you can make surrogates for them. What is your usage scenario so that you care about underlying type? In OOP you should not downcast things, you are expected to use them only by provided interfaces.

from aqlaserializer.

inethui avatar inethui commented on September 26, 2024

We have unit tests which compare the objects before and after serialization. The comparison verifies the object types to make sure that through deep cloning, we get exactly the same object back.

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on September 26, 2024

Ok. As I said you can use surrogates to hook into serialization process.

I don't see how type changing like this may cause an issue in a real app so I'm closing this.

from aqlaserializer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.