Ask Your Question
1

How to convert csv file to a Json list map

asked 2020-04-22 15:05:11 -0500

DevCoder gravatar image

updated 2020-04-23 21:00:21 -0500

metadaddy gravatar image

Hello All, I am able to create a flat Json from CSV using Json generator, but need help in creating a json List-Map structure. I see field flattener but anything to expand the Json?

{
  a: 1,
  b.x: 2,
  b.y: 3,
  b.z.ab: 4,
  b.z.bc: 5 
}

to

{
  a:1,
  b: {
    x:2,
    y:3,
    z: {
      ab:4,
      ab:5
    } 
  } 
}
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2020-04-23 21:01:22 -0500

metadaddy gravatar image

There isn't an off-the-shelf processor that can do that for you, but it should be relatively straightforward with one of the script processors.

edit flag offensive delete link more
0

answered 2020-04-24 10:45:55 -0500

DevCoder gravatar image

Thanks for your response I found this thread to be helpful in getting the Json output. https://ask.streamsets.com/question/4...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-04-22 15:05:11 -0500

Seen: 49 times

Last updated: Apr 24