Serializer Flashcards

1
Q

que signifie normalize/denormalize

A

normalize = obj -> array ; denormalize = Array -> obj

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

que signifie encode/decode

A

decode = Json -> Array ; encode = Array -> Json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

que signifie serialize/deserialize

A

deserialize = Json -> Obj (decode + denormalize) ; serialize = obj -> json (normalize + encode)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A quoi faut-il faire attention quand on instancie un Serializer

A

aux encoders et normalizers qu’on va employer avec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

a quoi sert AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES to False

A

throw Exception si attribute non mapper à la denormalization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

a quoi sert AbstractNormalizer::OBJECT_TO_POPULATE

A

à updater un obj déjà existant pendant la denormalization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a quoi sert AbstractObjectNormalizer::DEEP_OBJECT_TO_POPULATE to true

A

permet d’updater également les child du parent pendant la denormalization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

qu’est ce qu’on context de Serializer

A

permet d’attribuer des options de serialization différents suivant un context donner

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

qu’est ce qu’un group de serialization

A

une option permettant de définir quel attribut doit etre traité par le Serializer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

comment selectionner manuellement les attributs à gérer avec le Serializer

A

avec l’option AbstractNormalizer::ATTRIBUTES => [‘familyName’, ‘company’ => [‘name’]] dans le serializer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly