Skip to main content
Question

Convert a JSON string to JSON

  • June 20, 2022
  • 1 reply
  • 117 views

I am reading from Kafka in text format (as JSON format not supported) and trying to convert the JSON string into an actual JSON for flattening and pivoting. My sample data looks like below.

{"text":"\d0000\d0000\d0000\d00007{\"Employee\":{\"Address\":[{\"Addressid\":\"3897ef\"}],\"Role\":{\"Designation\":{\"name\":\"Manager\"}}}

 

I want to convert as follows

{
    "Employee": {
        "Address": [
            {
                "Addressid": "3897ef"
            }
        ],
        "Role": {
            "Designation": {
                "name": "Manager"
            }
        },
}

 

How can I covert this into a list map JSON hierarchy as above?

1 reply

Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • 486 replies
  • June 21, 2022

@ana00159 

can you please provide the correct sample data ,so i can give a try to convert into actual json.


Reply