You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ There is also a `ClassSettings` attribute that may be placed on classes to be se
107
107
*`includeFieldsByDefault`, which defaults to `true`. If set to false, a property with no `#[Field]` attribute will be ignored. It is equivalent to setting `exclude: true` on all properties implicitly.
108
108
*`requireValues`, which defaults to `false`. If set to true, then when deserializing any field that is not provided in the incoming data will result in an exception. This may also be turned on or off on a per-field level. (See `requireValue` below.) The class-level setting applies to any field that does not specify its behavior.
109
109
*`renameWith`. If set, the specified renaming strategy will be used for all properties of the class, unless a property specifies its own. (See `renameWith` below.) The class-level setting applies to any field that does not specify its behavior.
110
-
*`omitNullFields`, which defaults to false. If set to true, any property on the class that is null will be omitted when serializing. It has on effect on deserialization. This may also be turned on or off on a per-field level. (See `omitIfNull` below.)
110
+
*`omitNullFields`, which defaults to false. If set to true, any property on the class that is null will be omitted when serializing. It has no effect on deserialization. This may also be turned on or off on a per-field level. (See `omitIfNull` below.)
111
111
*`scopes`, which sets the scope of a given class definition attribute. See the section on Scopes below.
112
112
113
113
### `exclude` (bool, default false)
@@ -527,7 +527,7 @@ And it will deserialize back to the same original 3-layer-object structure.
527
527
528
528
### `flattenPrefix` (string, default '')
529
529
530
-
When an object or array property is flattened, by default its properties will be flattened using their existing name (or `serializedName`, if specified). That may cause issues if the same class is included in a parent class twice, or if there is some other name collission. Instead, flattened fields may be given a `flattenPrefix` value. That string will be prepended to the name of the property when serializing.
530
+
When an object or array property is flattened, by default its properties will be flattened using their existing name (or `serializedName`, if specified). That may cause issues if the same class is included in a parent class twice, or if there is some other name collision. Instead, flattened fields may be given a `flattenPrefix` value. That string will be prepended to the name of the property when serializing.
531
531
532
532
If set on a non-flattened field, this value is meaningless and has no effect.
533
533
@@ -640,7 +640,7 @@ use Crell\Serde\Attributes\DateField;
640
640
class Settings
641
641
{
642
642
#[DateField(format: 'Y-m-d')]
643
-
protected DateTimeImmutable $date = new DateTimeImmutable('4 July 2022-07-04 14:22);
643
+
protected DateTimeImmutable $date = new DateTimeImmutable('2022-07-04 14:22);
0 commit comments