skip to Main Content

Php – How to serialize nested object in symfony

I have the next class #[AssertCascade] class PropertyPromotionDto { public function __construct( private string $name, #[AssertNotBlank(message: 'Не может быть пустым')] private int $value, #[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i'])] private DateTimeImmutable $date, private NestedDto $nestedDto, /** @var NestedDto[] */ private array $nestedDtos,…

VIEW QUESTION

Json – Does deserialize method(mapper.readValue) allocate direct buffer memory instead of heap memory?

I would like to ask you something about ObjectMapper.readvalue(). ObjectMapper mapper = new ObjectMapper(); List<ConvertType> responseList = new ArrayList<>(); for (ExampleContent content : iterable) { String json = new String(content.getData(), StandardCharsets.UTF_8); responseList.add(mapper.readValue(json, ConvertType)); Like the code above, I want to…

VIEW QUESTION
Back To Top
Search