Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer Encoder/Decoder #41

Open
Spomky opened this issue Oct 28, 2024 · 0 comments
Open

Serializer Encoder/Decoder #41

Spomky opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Spomky
Copy link
Member

Spomky commented Oct 28, 2024

Description

This bundle ease the use of the CBOR decoder.
It could be great to allow the use of the decoder as a serializer decoder.

Also, the encoding process could be used.

Example

Similar to the example from the documentation:

use App\Model\Person;

$person = new Person();
$person->setName('foo');
$person->setAge(99);
$person->setSportsperson(false);

$cborContent = $serializer->serialize($person, 'cbor');

// $cborContent contains A4646E616D6563666F6F6361676518636C73706F727473706572736F6EF469637265617465644174F6

$person = $serializer->deserialize($cborContent, Person::class, 'cbor');
@Spomky Spomky added the enhancement New feature or request label Oct 28, 2024
@Spomky Spomky added this to the 4.0.0 milestone Oct 28, 2024
@Spomky Spomky self-assigned this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant