Introduction to Deserialization in Java | Important Interview topic
Автор: PrinceAutomationDestination
Загружено: 2025-07-26
Просмотров: 347
Описание:
💯 𝑰𝒏𝒕𝒓𝒐𝒅𝒖𝒄𝒕𝒊𝒐𝒏 𝒕𝒐 𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏: An Important Interview Question
👉 𝑷𝒓𝒐𝒄𝒆𝒔𝒔 𝒐𝒇 𝒄𝒐𝒏𝒗𝒆𝒓𝒕𝒊𝒏𝒈 𝒔𝒕𝒓𝒆𝒂𝒎 𝒐𝒇 𝒃𝒚𝒕𝒆𝒔 𝒊𝒏 𝒕𝒐 𝑱𝒂𝒗𝒂 𝑶𝒃𝒋𝒆𝒄𝒕𝒔 𝒊𝒔 𝒌𝒏𝒐𝒘𝒏 𝒂𝒔 𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏.
👉 𝑱𝒂𝒗𝒂 𝑶𝒃𝒋𝒆𝒄𝒕𝒔: Java object could be of Type of 𝑹𝒆𝒄𝒐𝒓𝒅 (𝑎 𝑠𝑝𝑒𝑐𝑖𝑎𝑙 𝑐𝑙𝑎𝑠𝑠 𝑖𝑛𝑡𝑟𝑜𝑑𝑢𝑐𝑒𝑑 𝑖𝑛 𝐽𝐷𝐾17) or 𝑷𝑶𝑱𝑶 class.
How to Validate 𝑱𝑺𝑶𝑵 𝑹𝒆𝒔𝒑𝒐𝒏𝒔𝒆 during 𝑨𝑷𝑰 𝑨𝒖𝒕𝒐𝒎𝒂𝒕𝒊𝒐𝒏❓
As part of 𝑨𝑷𝑰 𝑨𝒖𝒕𝒐𝒎𝒂𝒕𝒊𝒐𝒏, we hit a API Request and get the 𝑱𝑺𝑶𝑵 𝑹𝒆𝒔𝒑𝒐𝒏𝒔𝒆. Now we need to validate this 𝑱𝑺𝑶𝑵 𝑹𝒆𝒔𝒑𝒐𝒏𝒔𝒆 .
✅ Without 𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏: One way to validate is using JSON Path which is not much helpful in case of complex JSONs
✅Using 𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏: Another way is, we can 𝒄𝒐𝒏𝒗𝒆𝒓𝒕 the 𝑱𝑺𝑶𝑵 𝑹𝒆𝒔𝒑𝒐𝒏𝒔𝒆 to 𝑷𝑶𝑱𝑶/𝑹𝒆𝒄𝒐𝒓𝒅 classes,
⭐ This process of converting 𝑱𝑺𝑶𝑵 𝑹𝒆𝒔𝒑𝒐𝒏𝒔𝒆 to 𝑷𝑶𝑱𝑶/𝑹𝒆𝒄𝒐𝒓𝒅 Classes in known as 𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏 in API Automation.
Need of 𝑷𝑶𝑱𝑶 ❓
As dealing with complex JSON response is not straight forward so it's better to map them in to Java Objects Using POJO and then play with Java Objects.
Let us meet in the video:
Different ways of creating POJOs:
• Different Ways to Create POJO classes duri...
𝑫𝒆𝒔𝒆𝒓𝒊𝒂𝒍𝒊𝒛𝒂𝒕𝒊𝒐𝒏 Using 𝑹𝒆𝒄𝒐𝒓𝒅 (𝑎 𝑠𝑝𝑒𝑐𝑖𝑎𝑙 𝑐𝑙𝑎𝑠𝑠 𝑖𝑛𝑡𝑟𝑜𝑑𝑢𝑐𝑒𝑑 𝑖𝑛 𝐽𝐷𝐾17) :
• RECORD : A Special class in Java, lighter ...
Regards
PrinceAutomationDestination
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: