Ask Your Question

Revision history [back]

How to convert csv file to a Json list map

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 } } }

How to convert csv file to a Json list map

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,
  a: 1,
  b.x: 2,
  b.y: 3,
  b.z.ab: 4,
  b.z.bc: 5 }

}

to

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

}