Skip to content

Make more flexible to customize unserialization of classes #16

Open

Description

@jrbasso

We currently have a special condition for DateTime class, but looking at the project forks people are also extending it MongoId and MongoDate. Having an easier way to customize it would be ideal to avoid forks and customization diverging the project.

An idea would be making JsonSerializer receive a list of classname with callable to generate the output. It would be used on the unserialize portion. The current DateTime customization would live in this project since it is a php-core class. People could add it on demand.

Update docs to explain how to implement these customizations too and how to use.

Activity

  1. self-assigned this
    on Feb 29, 2016
  2. added this to the 3.0 milestone on Feb 29, 2016
  3. jrbasso commented on Jun 16, 2016

    @jrbasso
    MemberAuthor

    #25 adds the support for this functionality. I will be creating the custom serializers for things like DateTime and Mongo.

  4. modified the milestones: 3.0, 3.1 on Jul 20, 2020
  5. modified the milestones: 3.1, 3.2 on Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions