Giter VIP home page Giter VIP logo

Comments (5)

julman99 avatar julman99 commented on July 18, 2024

Thanks for reporting the issue. I just added a test that checks a single level recursion and it seems to work. Can you review the test and check if that is the scenario you are describing?

Test: https://github.com/julman99/gson-fire/blob/master/src/test/java/io/gsonfire/gson/HooksTest.java#L43

from gson-fire.

a-a-davydov avatar a-a-davydov commented on July 18, 2024

Thanks for reaction Julio.

It seems I don't describe my case correct.

I've made some investigation in my and your code.

So, bug is caused by TypeSelector.

I.E. more detailed my case is

abstract class ANode {
int i;
int typeId;
ANode next;
}

class CNode1 extends ANode {
//stuff
}

class CNode2 extends ANode {
//stuff
}

And I use type selector to determinate which class to use during deserialisation.

It cause TypeSelectorTypeAdapterFactory added in gson.

As I see in
https://github.com/julman99/gson-fire/blob/master/src/main/java/io/gsonfire/gson/TypeSelectorTypeAdapterFactory.java
on line 62 and 63, TypeSelectorTypeAdapter make default deserialisation without pre- post- hooks.

from gson-fire.

a-a-davydov avatar a-a-davydov commented on July 18, 2024

Now is late evening here =). I can send detailed test on sunday, if need.

from gson-fire.

julman99 avatar julman99 commented on July 18, 2024

Oh yes, the TypeSelector is breaking the hooks, post-serializer and other things in some cases. It is a known issue I am working and will be out within the next 2 weeks.

from gson-fire.

julman99 avatar julman99 commented on July 18, 2024

Just released version 1.8.0 that contains a fix for this issue. Can you confirm it works for you?

Thanks

from gson-fire.

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.