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
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,11 +331,11 @@ The `JsonMapper` constructor accepts the following options:
331
331
332
332
This option accepts an `OnExtraProperties` enum value, and controls how `JsonMapper` reacts if a JSON object contains a property that does not have a matching parameter in the corresponding DTO's constructor signature:
333
333
334
-
-**`OnExtraProperties::THROW_EXCEPTION`**
334
+
-**`OnExtraProperties::ThrowException`**
335
335
336
336
`JsonMapper` will throw a `JsonMapperException`. This is the default value.
337
337
338
-
-**`OnExtraProperties::IGNORE`**
338
+
-**`OnExtraProperties::Ignore`**
339
339
340
340
`JsonMapper` will ignore any extra properties:
341
341
@@ -360,7 +360,7 @@ The `JsonMapper` constructor accepts the following options:
360
360
}';
361
361
362
362
$mapper = new JsonMapper(
363
-
onExtraProperties: OnExtraProperties::IGNORE,
363
+
onExtraProperties: OnExtraProperties::Ignore,
364
364
);
365
365
366
366
// extra properties "extraProperty" and "otherExtraProperty" are ignored,
@@ -372,11 +372,11 @@ The `JsonMapper` constructor accepts the following options:
372
372
373
373
This option accepts an `OnMissingProperties` enum value, and controls how `JsonMapper` reacts if a JSON object is missing a property that is declared in the corresponding DTO's constructor signature:
374
374
375
-
- **`OnMissingProperties::THROW_EXCEPTION`**
375
+
- **`OnMissingProperties::ThrowException`**
376
376
377
377
`JsonMapper` will throw a `JsonMapperException`. This is the default value.
378
378
379
-
- **`OnMissingProperties::SET_NULL`**
379
+
- **`OnMissingProperties::SetNull`**
380
380
381
381
`JsonMapper` will set the parameter to `null` if the JSON property is missing and the parameter is nullable:
382
382
@@ -398,7 +398,7 @@ The `JsonMapper` constructor accepts the following options:
0 commit comments