Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
192 views

I have a json with collections of data like these : { "item_a": { "name": "Item A", "description": "...", }, "item_b&...
Cedric Molines's user avatar
0 votes
1 answer
82 views

I am trying to parse this JSON $response body = {"low":{"networkFee":"0.00003"},"medium":{"networkFee":"0.0000428"},"high":{"...
Russo's user avatar
  • 3,240
1 vote
1 answer
640 views

I use Symfony Serializer component outside the framework. I have custom normalizer and I want to pass some extra context to it from the field like this: class TariffDto { #[Context([...
Andrey Yanduganov's user avatar
0 votes
1 answer
111 views

I need to save a snapshot of an entity in a json field and I'm trying to deserialize it. The problem is that the result of the deserialization, has all the ID with null value. I dont want to insert ...
zangetsu's user avatar
  • 106
1 vote
1 answer
219 views

I have app based on symfony5.4. Inside this app I have a class for client like this: class Client { #[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])] public \DateTimeImmutable $...
Andrew Markhai's user avatar
0 votes
0 answers
572 views

In a Controller, during serialization, using the Symfony Serializer, I need to dynamically add a property portal to an object, depending on an outside $portal value, which is a query argument. $...
kaiser's user avatar
  • 22.4k
2 votes
1 answer
1k views

I'm trying to deserialize an XML-file to an object containing an array of other objects using Symfony Serializer, but can't get it to work with an array of objects under a specific key. Here's a ...
Select0r's user avatar
  • 12.7k
3 votes
1 answer
1k views

I have a symfony serializer that i initialize this way : $this->serializer = new Serializer( [ new ArrayDenormalizer(), new UidNormalizer(), new BackedEnumNormalizer(), ...
Methraen's user avatar
0 votes
1 answer
531 views

php Symfony serializer - Deserialize xml to array of objects How deserialize xml with attributes to array of objects? $string = '<?xml version="1.0" encoding="UTF-8" ?> <...
Kanat's user avatar
  • 3
0 votes
1 answer
551 views

I'm working with API Platform using Doctrine Inheritance and I have a problem persisting a OneToMany relation. curl --location 'http://localhost/api/dummies' \ --header 'Content-Type: application/json'...
Javier Trejo's user avatar
0 votes
1 answer
821 views

I cant figure out how to deserialize this xml with the symfony serializer <?xml version="1.0" encoding="UTF-8"?> <issues> <issue id="1" name="test&...
23nr1's user avatar
  • 31
2 votes
1 answer
170 views

There is xmlencoder in symfony serializer, by using that we achive this. $data = ['foo' => 'Foo value']; $encoder = new XmlEncoder(); $encoder->encode($data, 'xml'); // is encoded as follows: //...
Kalhan's user avatar
  • 21.9k