Skip to content

[Feature] Allow dot-notation for JSON paths #9

Open
@szainmehdi

Description

Using the example definition in the README, it would be great (and familiar to Laravel users) to define nested JSON mappings using dot-notation.

class Schedule
{
    use JsonSerialize;

    #[Json('data.start')]
    protected int $start;

    #[Json('data.end')]
    protected int $end;

    public function __construct(int $start, int $end)
    {
        $this->start = $start;
        $this->end = $end;
    }
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions