Skip to content

Minor changes in Serializer Component #8321

Closed
@watlf

Description

@watlf

There are a few arguments in code examples that were missed:
Converting Property Names when Serializing and Deserializing

$json = $serializer->serialize($obj);
// {"org_name": "Acme Inc.", "org_address": "123 Main Street, Big City"}
$objCopy = $serializer->deserialize($json);

It should looks like:
$json = $serializer->serialize($obj, 'json');
// {"org_name": "Acme Inc.", "org_address": "123 Main Street, Big City"}
$objCopy = $serializer->deserialize($json, Company::class, 'json');

Metadata

Metadata

Assignees

No one assigned

    Labels

    SerializerhasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions