Giter VIP home page Giter VIP logo

Comments (6)

jacobdufault avatar jacobdufault commented on July 21, 2024

I'll take a look this weekend, but this is almost certainly related to 414e21e.

from fullserializer.

jacobdufault avatar jacobdufault commented on July 21, 2024

What does the CanProcess function look like?

If it looks like typeof(BaseNode) == type, can you try changing it to return typeof(BaseNode).IsAssignableFrom(type) instead?

I made a change so that processors are resolved based on the actual instance type instead of the type passed in - still thinking about the proper behavior. I may revert it to be based on the declared deserialization type and not the instance type.

from fullserializer.

jacobdufault avatar jacobdufault commented on July 21, 2024

Also, is OnBeforeDeserialize getting called?

from fullserializer.

nuverian avatar nuverian commented on July 21, 2024

Hey Jacob,

Thanks for taking a look into it.
Sorry. I forgot to mention it initialy, but OnBeforeDeserialize is called normaly yes. That's the most weird part actually.

CanProcess is also "declared" like typeof(BaseNode).IsAssignableFrom(type).

Right after OnBeforeDeserialize is called, the error "Cannot create an instance of an interface or abstract type for BaseNode" is thrown, which is normaly the case when the serialized $type is missing. That's what I am trying to handle in OnBeforeDeserialize by altering the serialized information.

This used to work a couple of version back. I can't really say why it doesn't now :)
If you need more information, please let me know.

Thanks a lot!

from fullserializer.

jacobdufault avatar jacobdufault commented on July 21, 2024

I believe the given commit should fix the issue. Let me know.

from fullserializer.

nuverian avatar nuverian commented on July 21, 2024

Hey Jacob,

Everything works fine again with the latest commit.

Thanks a lot!

from fullserializer.

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.