Skip to Content
1
May 27, 2020 at 02:05 AM

JSON TO ABAP Conversation

273 Views

Hi, i am using class:   CALL METHOD cl_fdt_json=>json_to_data
    EXPORTING
      iv_json = in_string
    CHANGING
      ca_data = abap structure.
for converting json into abap .
json structure: 
{
  "recurringPaymentInfo": {
    "id": "a889898989",
    "referanceNumber": "76556",
    "activityIndicator": "NEW",
    "channel": "agent",
    "cancelRecurring": "false",
    "stopPay": "false",
    "authorizationType": "",
    "agentEmail": "",
    "maxAmount": "",
    "customer": {
      "phoneNumber": "5345",
      "email": "test.test@test.com",
      "address": {
        "line1": "87,okhle street",
        "city": "woodlandHills",
        "country": "usa",
        "zipCode": "91367"
      },
      "paymentMethod": {
        "requestReasonType": "EFT/PC/CC",
        "accountHolderName": "abc",
        "BankRoutingNumber": "3434",
        "bankName": "chase",
        "cardNumber": "visa/master/amex",
        "cardStartDate": "11414124",
        "cardToDate": "24242412",
        "region": "CA"
      }
    }
  }
}

i dont want the root object: recurringpaymentinfo , rather the incoming json i need to convert starting from {ID: . in that case, i can able to convert the json to abap structure successfully,
could you please tell me what i should do to get rid of the root element.