json,鄙人研究了很长时间,没有进展

json在线等,鄙人研究了很长时间,没有进展
{"A":{"A95":{"price":666,"rebate":10},A92:{"price":888,"rebate":20}},"B":{“B0”:{"price":454,"rebate":3454}}}
上面是一组json字符串,A:表示汽油,B:表示柴油
A95:表示95号汽油,A92:表示92号汽油
B0:表示0号柴油
price:表示每升油所对应的单价
rebate:表示优惠信息
现在要解析这组json字符串,存入VO对象中(VO对象自己定义),帮忙看看,最后给出代码。
------解决思路----------------------
引用
这是写的一个vo对象 

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.google.gson.Gson;
import com.google.gson.internal.StringMap;

public class Test {

/**
 * @param args
 * @throws IOException 
 */
public static void main(String[] args) throws IOException {

//json字符串
String str=getJsonStr();
//把json字符串转为自己的VO列表
List<VO> list = convertJsonToList(str);
//重新输出JSON(实际上组装为下面的JSON比较方面)
Gson gson = new Gson();
System.out.println(gson.toJson(list));
//[{"type":"A95","pidtype":"A","price":"666.0","rebate":"10.0"},
//{"type":"A92","pidtype":"A","price":"888.0","rebate":"20.0"},
//{"type":"B0","pidtype":"B","price":"454.0","rebate":"3454.0"}]

}


/**
 * 获得要转换的JSON字符串<br>
 * 这边为了方面我直接读的我本地的文件内容为你要转换的json字符串
 * @return
 * @throws IOException
 */
private static String getJsonStr() throws IOException{
StringBuffer sbf = new StringBuffer();
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream( "F:"+File.separator+"json.txt"),"UTF-8"));
//json字符串
String str="";
while((str=reader.readLine())!=null){
sbf.append(str);
}
reader.close();
return sbf.toString();
}

private static StringMap parseJson(String jsonstr){
Gson gson = new Gson();
StringMap strMapArray=gson.fromJson(jsonstr, StringMap.class);
return strMapArray;
}

/**
 * 把json字符串转为自己的VO列表
 * @param str
 * @return
 * @throws ClassNotFoundException 
 * @throws IllegalAccessException 
 * @throws InstantiationException 
 */
private static List<VO> convertJsonToList(String str ) {
Map<String,Map<String,Map<String,Object>>> map = parseJson(str);
List<VO> list = new ArrayList<VO>();
Iterator<String> iterator = map.keySet().iterator();
while(iterator.hasNext()){
String firstkey = iterator.next();
Map<String,Map<String,Object>> voMap= map.get(firstkey);
Iterator<String> iteratorVO = voMap.keySet().iterator();
while(iteratorVO.hasNext()){
String key = iteratorVO.next();
Map<String,Object> map1 = voMap.get(key);
VO vo = new VO();
vo.setType(key);
vo.setPidtype(firstkey);
vo.setPrice(""+map1.get("price"));
vo.setRebate(""+map1.get("rebate"));
list.add(vo);
}
}

return list;
}


}

class VO {

private String type;//当前油的种类
private String pidtype;//当前油的所属的种类(汽油/柴油)
private String price;//价格
private String rebate;//优惠信息
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getRebate() {
return rebate;
}
public void setRebate(String rebate) {
this.rebate = rebate;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPidtype() {
return pidtype;
}
public void setPidtype(String pidtype) {
this.pidtype = pidtype;
}
}