How can I remove proxies field in symfony json -
i want remove proxies fields __initializer__: null,__cloner__: null, __isinitialized__: true,
returned json have no idea.
i dont want use * @serializer\exclude()
because there more fields next fields.
here sample json:
emails: [ { id: 1, subject: "mrs. astrid wuckert", body: "excepturi.", sendcopy: false, roles: [ { __initializer__: null, __cloner__: null, __isinitialized__: true, name: "role_admin" }, { name: "role_reseller" }, { name: "role_retailer" }, { name: "role_club_shop" } ] }, ]
thanks in advance.
try call ignoring fields while creating normalizer:
$normalilzer->setignoredattributes(["__initializer__", "__cloner__","__isinitialized__"]);
Comments
Post a Comment