cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to create root tag and sub tags in jSon?

mohammed24
Participant
0 Kudos
180

Hi Experts

i am trying to get below json data from Postman to controller as POST request.

When i am specifying root tag(productInfo) in json data i am getting null and when when i remove root tag from json i am able to see the data(values) in controller...Can anyone tell me how to create/access the root tag(productInfo) in DTO's or is there any other way to do it?

 <bean class="de.hybris.platform.commercewebservicescommons.dto.product.ProdutDTO">
         <property name="A" type="String"/> 
         <property name="B" type="String"/>
          <property name="C" type="String"/> 
         <property name="D" type="String"/> 
 </bean>

Json Data :

 {
    "ProductInfo":{
       "A": "1",
       "B": "2",
       "C": "3",
       "D": "4"
   }
 }


Accepted Solutions (0)

Answers (0)