Converting Excel to JSON
I have read an excel document using apache-poi.
The excel document which have records like:

A1 A2 A3 A4

A1 A2 B3 B4

i want to convert them into JSON arrays like

 { A1 : {A2 : {A3 : {A4 : some_value } } , {B3 : {B4 : some_value } } } }

Actually its easy to convert to XML.
Please tell me how to solve this. 
Only hints would suffice.
Converting Excel to JSON
===

I have read an excel document using apache-poi.
The excel document which have records like:

A1 A2 A3 A4

A1 A2 B3 B4

i want to convert them into JSON arrays like

 { A1 : {A2 : {A3 : {A4 : some_value } } , {B3 : {B4 : some_value } } } }

Actually its easy to convert to XML.
Please tell me how to solve this. 
Only hints would suffice.