Add pjson support
This commit is contained in:
16
tests/PjsonDocument.php
Normal file
16
tests/PjsonDocument.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Test;
|
||||
|
||||
use Square\Pjson\{Json, JsonSerialize};
|
||||
|
||||
/**
|
||||
* A test document annotated with pjson attributes using the `JsonSerialize` trait
|
||||
*/
|
||||
class PjsonDocument
|
||||
{
|
||||
use JsonSerialize;
|
||||
|
||||
public function __construct(#[Json] public PjsonId $id = new PjsonId(''), #[Json] public string $name = '',
|
||||
#[Json('num_value')] public int $numValue = 0, public string $skipped = 'yep') { }
|
||||
}
|
||||
Reference in New Issue
Block a user