Skip to content

Commit 8802144

Browse files
authored
Merge pull request #8 from undabot/v2.2.3
fix(model denormalizer): float parsing issue
2 parents 74ff95c + bb0962a commit 8802144

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Service/Resource/Denormalizer/ResourceDenormalizer.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
class ResourceDenormalizer
2020
{
21+
private const DATA_FORMAT = 'json';
22+
2123
public function __construct(
2224
private ResourceMetadataFactoryInterface $metadataFactory,
2325
private DenormalizerInterface $denormalizer
@@ -43,7 +45,7 @@ public function denormalize(ResourceInterface $resource, string $class): ApiMode
4345

4446
try {
4547
/** @var ApiModel $result */
46-
$result = $this->denormalizer->denormalize($data, $class, null, [
48+
$result = $this->denormalizer->denormalize($data, $class, self::DATA_FORMAT, [
4749
AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => true,
4850
]);
4951
} catch (MissingConstructorArgumentsException $e) {

0 commit comments

Comments
 (0)