JMS serialization exception php -


i have following classes

/**  * @discriminator(field = "type", map = {  *      "b":"b",         "c":"c",  * })  */ abstract class {}  class b extends { ... } class c extends {      /**      * @var      * @serializer\type("a")      */       $a } 

now when serialize object of class c:

the discriminator field name "type" base-class "a" not found in input data.

any idea doing wrong here? using jms serializer.

edit

i getting exception when try deserialize serialized object.

an abstract class can't initialized , therefor not deserialized. if need class a, should change normal class , not beeing abstract.

i had similar problem year ago, solution: jms serializer deserialize abstract parent class


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -