Json格式的字符串转换为Json格式
原数据格式如下:
"[{\"provinceId\":9,\"provinceName\":\"河北省\",\"city\":[{\"cityId\":244,\"cityName\":\"衡水市\",\"area\":[{\"areaId\":2012,\"areaName\":\"桃城区\"},{\"areaId\":2008,\"areaName\":\"冀州区\"},{\"areaId\":2015,\"areaName\":\"枣强县\"},{\"areaId\":2014,\"areaName\":\"武邑县\"},{\"areaId\":2013,\"areaName\":\"武强县\"},{\"areaId\":2010,\"areaName\":\"饶阳县\"},{\"areaId\":2005,\"areaName\":\"安平县\"},{\"areaId\":2007,\"areaName\":\"故城县\"},{\"areaId\":2009,\"areaName\":\"景县\"},{\"areaId\":2006,\"areaName\":\"阜城县\"},{\"areaId\":2011,\"areaName\":\"深州市\"}]},{\"cityId\":245,\"cityName\":\"邢台市\",\"area\":[{\"areaId\":2027,\"areaName\":\"襄都区\"},{\"areaId\":2028,\"areaName\":\"信都区\"},{\"areaId\":2030,\"areaName\":\"任泽区\"},{\"areaId\":2024,\"areaName\":\"南和区\"},{\"areaId\":2019,\"areaName\":\"临城县\"},{\"areaId\":2022,\"areaName\":\"内丘县\"},{\"areaId\":2016,\"areaName\":\"柏乡县\"},{\"areaId\":2021,\"areaName\":\"隆尧县\"},{\"areaId\":2025,\"areaName\":\"宁晋县\"},{\"areaId\":2018,\"areaName\":\"巨鹿县\"},{\"areaId\":2033,\"areaName\":\"新河县\"},{\"areaId\":2017,\"areaName\":\"广宗县\"},{\"areaId\":2026,\"areaName\":\"平乡县\"},{\"areaId\":2032,\"areaName\":\"威县\"},{\"areaId\":2029,\"areaName\":\"清河县\"},{\"areaId\":2020,\"areaName\":\"临西县\"},{\"areaId\":2023,\"areaName\":\"南宫市\"},{\"areaId\":2031,\"areaName\":\"沙河市\"}]},{\"cityId\":37,\"cityName\":\"石家庄市\",\"area\":[{\"areaId\":225,\"areaName\":\"长安区\"},{\"areaId\":227,\"areaName\":\"桥西区\"},{\"areaId\":228,\"areaName\":\"新华区\"},{\"areaId\":230,\"areaName\":\"井陉矿区\"},{\"areaId\":229,\"areaName\":\"裕华区\"},{\"areaId\":232,\"areaName\":\"藁城区\"},{\"areaId\":235,\"areaName\":\"鹿泉区\"},{\"areaId\":238,\"areaName\":\"栾城区\"},{\"areaId\":236,\"areaName\":\"井陉县\"},{\"areaId\":237,\"areaName\":\"正定县\"},{\"areaId\":239,\"areaName\":\"行唐县\"},{\"areaId\":240,\"areaName\":\"灵寿县\"},{\"areaId\":241,\"areaName\":\"高邑县\"},{\"areaId\":242,\"areaName\":\"深泽县\"},{\"areaId\":243,\"areaName\":\"赞皇县\"},{\"areaId\":244,\"areaName\":\"无极县\"},{\"areaId\":245,\"areaName\":\"平山县\"},{\"areaId\":246,\"areaName\":\"元氏县\"},{\"areaId\":247,\"areaName\":\"赵县\"},{\"areaId\":3265,\"areaName\":\"石家庄高新技术产业开发区\"},{\"areaId\":231,\"areaName\":\"辛集市\"},{\"areaId\":233,\"areaName\":\"晋州市\"},{\"areaId\":234,\"areaName\":\"新乐市\"}]},{\"cityId\":38,\"cityName\":\"邯郸市\",\"area\":[{\"areaId\":661,\"areaName\":\"邯山区\"},{\"areaId\":662,\"areaName\":\"丛台区\"},{\"areaId\":663,\"areaName\":\"复兴区\"},{\"areaId\":664,\"areaName\":\"峰峰矿区\"},{\"areaId\":672,\"areaName\":\"肥乡区\"},{\"areaId\":673,\"areaName\":\"永年区\"},{\"areaId\":667,\"areaName\":\"临漳县\"},{\"areaId\":668,\"areaName\":\"成安县\"},{\"areaId\":669,\"areaName\":\"大名县\"},{\"areaId\":670,\"areaName\":\"涉县\"},{\"areaId\":671,\"areaName\":\"磁县\"},{\"areaId\":674,\"areaName\":\"邱县\"},{\"areaId\":675,\"areaName\":\"鸡泽县\"},{\"areaId\":676,\"areaName\":\"广平县\"},{\"areaId\":677,\"areaName\":\"馆陶县\"},{\"areaId\":678,\"areaName\":\"魏县\"},{\"areaId\":679,\"areaName\":\"曲周县\"},{\"areaId\":665,\"areaName\":\"武安市\"}]},{\"cityId\":39,\"cityName\":\"保定市\",\"area\":[{\"areaId\":1132,\"areaName\":\"竞秀区\"},{\"areaId\":1114,\"areaName\":\"莲池区\"},{\"areaId\":1124,\"areaName\":\"满城区\"},{\"areaId\":1126,\"areaName\":\"清苑区\"},{\"areaId\":1121,\"areaName\":\"涞水县\"},{\"areaId\":1118,\"areaName\":\"阜平县\"},{\"areaId\":1134,\"areaName\":\"徐水区\"},{\"areaId\":1116,\"areaName\":\"定兴县\"},{\"areaId\":1130,\"areaName\":\"唐县\"},{\"areaId\":1120,\"areaName\":\"高阳县\"},{\"areaId\":1122,\"areaName\":\"涞源县\"},{\"areaId\":1131,\"areaName\":\"望都县\"},{\"areaId\":1135,\"areaName\":\"易县\"},{\"areaId\":1127,\"areaName\":\"曲阳县\"},{\"areaId\":1123,\"areaName\":\"蠡县\"},{\"areaId\":1129,\"areaName\":\"顺平县\"},{\"areaId\":1115,\"areaName\":\"博野县\"},{\"areaId\":3296,\"areaName\":\"保定白沟新城\"},{\"areaId\":1136,\"areaName\":\"涿州市\"},{\"areaId\":1117,\"areaName\":\"定州市\"},{\"areaId\":1112,\"areaName\":\"安国市\"},{\"areaId\":1119,\"areaName\":\"高碑店市\"},{\"areaId\":3268,\"areaName\":\"雄安新区\"}]},{\"cityId\":40,\"cityName\":\"张家口市\",\"area\":[{\"areaId\":1143,\"areaName\":\"桥东区\"},{\"areaId\":1144,\"areaName\":\"桥西区\"},{\"areaId\":1148,\"areaName\":\"下花园区\"},{\"areaId\":1146,\"areaName\":\"万全区\"},{\"areaId\":1138,\"areaName\":\"崇礼区\"},{\"areaId\":1152,\"areaName\":\"张北县\"},{\"areaId\":1142,\"areaName\":\"康保县\"},{\"areaId\":1139,\"areaName\":\"沽源县\"},{\"areaId\":1145,\"areaName\":\"尚义县\"},{\"areaId\":1147,\"areaName\":\"蔚县\"},{\"areaId\":1151,\"areaName\":\"阳原县\"},{\"areaId\":1140,\"areaName\":\"怀安县\"},{\"areaId\":1141,\"areaName\":\"怀来县\"},{\"areaId\":1153,\"areaName\":\"涿鹿县\"},{\"areaId\":1137,\"areaName\":\"赤城县\"},{\"areaId\":3264,\"areaName\":\"张家口市察北管理区\"},{\"areaId\":1149,\"areaName\":\"宣化区\"}]},{\"cityId\":41,\"cityName\":\"承德市\",\"area\":[{\"areaId\":1161,\"areaName\":\"双桥区\"},{\"areaId\":1160,\"areaName\":\"双滦区\"},{\"areaId\":1164,\"areaName\":\"鹰手营子矿区\"},{\"areaId\":1154,\"areaName\":\"承德县\"},{\"areaId\":1163,\"areaName\":\"兴隆县\"},{\"areaId\":1158,\"areaName\":\"滦平县\"},{\"areaId\":1157,\"areaName\":\"隆化县\"},{\"areaId\":1155,\"areaName\":\"丰宁满族自治县\"},{\"areaId\":1156,\"areaName\":\"宽城满族自治县\"},{\"areaId\":1162,\"areaName\":\"围场满族蒙古族自治县\"},{\"areaId\":1159,\"areaName\":\"平泉市\"}]},{\"cityId\":42,\"cityName\":\"唐山市\",\"area\":[{\"areaId\":612,\"areaName\":\"路南区\"},{\"areaId\":613,\"areaName\":\"路北区\"},{\"areaId\":614,\"areaName\":\"古冶区\"},{\"areaId\":615,\"areaName\":\"开平区\"},{\"areaId\":616,\"areaName\":\"丰南区\"},{\"areaId\":617,\"areaName\":\"丰润区\"},{\"areaId\":1165,\"areaName\":\"曹妃甸区\"},{\"areaId\":621,\"areaName\":\"滦南县\"},{\"areaId\":622,\"areaName\":\"乐亭县\"},{\"areaId\":623,\"areaName\":\"迁西县\"},{\"areaId\":624,\"areaName\":\"玉田县\"},{\"areaId\":3220,\"areaName\":\"河北唐山芦台经济开发区\"},{\"areaId\":3217,\"areaName\":\"唐山市汉沽管理区\"},{\"areaId\":3218,\"areaName\":\"唐山高新技术产业开发区\"},{\"areaId\":3219,\"areaName\":\"河北唐山海港经济开发区\"},{\"areaId\":618,\"areaName\":\"遵化市\"},{\"areaId\":619,\"areaName\":\"迁安市\"},{\"areaId\":620,\"areaName\":\"滦州市\"}]},{\"cityId\":43,\"cityName\":\"廊坊市\",\"area\":[{\"areaId\":1166,\"areaName\":\"安次区\"},{\"areaId\":1171,\"areaName\":\"广阳区\"},{\"areaId\":1170,\"areaName\":\"固安县\"},{\"areaId\":1175,\"areaName\":\"永清县\"},{\"areaId\":1174,\"areaName\":\"香河县\"},{\"areaId\":1169,\"areaName\":\"大城县\"},{\"areaId\":1173,\"areaName\":\"文安县\"},{\"areaId\":1168,\"areaName\":\"大厂回族自治县\"},{\"areaId\":1167,\"areaName\":\"霸州市\"},{\"areaId\":1172,\"areaName\":\"三河市\"}]},{\"cityId\":44,\"cityName\":\"沧州市\",\"area\":[{\"areaId\":1189,\"areaName\":\"新华区\"},{\"areaId\":1191,\"areaName\":\"运河区\"},{\"areaId\":1177,\"areaName\":\"沧县\"},{\"areaId\":1184,\"areaName\":\"青县\"},{\"areaId\":1178,\"areaName\":\"东光县\"},{\"areaId\":1179,\"areaName\":\"海兴县\"},{\"areaId\":1190,\"areaName\":\"盐山县\"},{\"areaId\":1186,\"areaName\":\"肃宁县\"},{\"areaId\":1183,\"areaName\":\"南皮县\"},{\"areaId\":1187,\"areaName\":\"吴桥县\"},{\"areaId\":1188,\"areaName\":\"献县\"},{\"areaId\":1182,\"areaName\":\"孟村回族自治县\"},{\"areaId\":1176,\"areaName\":\"泊头市\"},{\"areaId\":1185,\"areaName\":\"任丘市\"},{\"areaId\":1181,\"areaName\":\"黄骅市\"},{\"areaId\":1180,\"areaName\":\"河间市\"}]},{\"cityId\":47,\"cityName\":\"秦皇岛市\",\"area\":[{\"areaId\":680,\"areaName\":\"海港区\"},{\"areaId\":681,\"areaName\":\"山海关区\"},{\"areaId\":682,\"areaName\":\"北戴河区\"},{\"areaId\":683,\"areaName\":\"青龙满族自治县\"},{\"areaId\":684,\"areaName\":\"昌黎县\"},{\"areaId\":685,\"areaName\":\"抚宁区\"},{\"areaId\":686,\"areaName\":\"卢龙县\"},{\"areaId\":3204,\"areaName\":\"秦皇岛市经济技术开发区\"},{\"areaId\":687,\"areaName\":\"北戴河新区\"}]}]}]"
修改如下:
// 定义一个静态方法,接收一个字符串参数,返回一个JSONArray对象,并可能抛出JsonProcessingException异常
public static JSONArray resultFxt(String resultStr) throws JsonProcessingException {
// 创建ObjectMapper实例,用于处理JSON数据
ObjectMapper objectMapper = new ObjectMapper();
// 声明一个String变量jsonObject,用于存储解析后的JSON字符串(此变量命名不够准确,后续实际存储的是字符串化的JSON对象)
String jsonObject = null;
// 声明一个JSONArray变量jona,用于存储最终的JSON数组
JSONArray jsona = null;
// 声明一个FxtResultEntity类型的变量fxtParam,用于存储解析后的业务数据对象
FxtResultEntity fxtParam;
// 使用ObjectMapper将传入的字符串resultStr解析为FxtResultEntity对象
fxtParam = objectMapper.readValue(resultStr, FxtResultEntity.class);
// 判断解析后的业务数据对象是否为null
if (fxtParam != null) {
// 判断业务数据对象的状态码是否为0(通常表示成功)
if (fxtParam.getCode() == 0) {
// 将业务数据对象的body属性(通常是一个复杂的Java对象)转换为JSON格式的字符串
String json = JSON.toJSONString(fxtParam.getBody());
System.out.println("此处返回的就是上面展示的数据格式:" + json);
//重点是这两行将json字符串转换为json格式
jsonObject = JSON.parseObject(json, String.class);
jona = (JSONArray)JSONArray.parse(String.valueOf(jsonObject));
}
}
// 返回最终的JSONArray对象,可能为null
return jsona;
}
package sring.finserv.api.entity.sfjk.fxt;
import lombok.Data;
import sring.finserv.api.common.response.ErrorCode;
import java.io.Serializable;
import java.util.List;
/**
此实体类之所以这样定义因为第三方接口的返回是一个json格式的字符串,方便存到redis中的
省市区存在Body中,解析为json格式,其他返回码比如code,message等,我并没有处理。仅供参考
**/
@Data
public class FxtResultEntity implements Serializable {
private static final long serialVersionUID = -6122402055911679663L;
private int code;
private String errmsg;
private String signature;
private long timestamp;
ErrorCode errorCode;
public ErrorCode getErrorCode() {
return errorCode;
}
public void setErrorCode(ErrorCode errorCode) {
this.errorCode = errorCode;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getErrmsg() {
return errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
this.signature = signature;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
private String body;
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public static class Body {
private Province provinces;
public Province getProvinces() {
return provinces;
}
public void setProvinces(Province provinces) {
this.provinces = provinces;
}
public static class Province {
private int provinceId;
private String provinceName;
private List<City> city;
public Province() {
}
// Getter and Setter
public int getProvinceId() {
return provinceId;
}
public void setProvinceId(int provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public List<City> getCity() {
return city;
}
public void setCity(List<City> city) {
this.city = city;
}
public void setBody(List<Province> list) {
}
public static class City {
private int cityId;
private String cityName;
private List<Area> area;
public City() {
}
// Getter and Setter
public int getCityId() {
return cityId;
}
public void setCityId(int cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public List<Area> getArea() {
return area;
}
public void setArea(List<Area> area) {
this.area = area;
}
public void setBody(List<City> cityList) {
}
public static class Area {
private int areaId;
private String areaName;
public Area() {
}
// Getter and Setter
public int getAreaId() {
return areaId;
}
public void setAreaId(int areaId) {
this.areaId = areaId;
}
public String getAreaName() {
return areaName;
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public void setBody(List<Area> areaList) {
}
}
}
}
}
}
返回的正确结果如下:
[
{
"city": [
{
"area": [
{
"areaId": 2012,
"areaName": "桃城区"
},
{
"areaId": 2008,
"areaName": "冀州区"
},
{
"areaId": 2015,
"areaName": "枣强县"
},
{
"areaId": 2014,
"areaName": "武邑县"
},
{
"areaId": 2013,
"areaName": "武强县"
},
{
"areaId": 2010,
"areaName": "饶阳县"
},
{
"areaId": 2005,
"areaName": "安平县"
},
{
"areaId": 2007,
"areaName": "故城县"
},
{
"areaId": 2009,
"areaName": "景县"
},
{
"areaId": 2006,
"areaName": "阜城县"
},
{
"areaId": 2011,
"areaName": "深州市"
}
],
"cityName": "衡水市",
"cityId": 244
},
{
"area": [
{
"areaId": 2027,
"areaName": "襄都区"
},
{
"areaId": 2028,
"areaName": "信都区"
},
{
"areaId": 2030,
"areaName": "任泽区"
},
{
"areaId": 2024,
"areaName": "南和区"
},
{
"areaId": 2019,
"areaName": "临城县"
},
{
"areaId": 2022,
"areaName": "内丘县"
},
{
"areaId": 2016,
"areaName": "柏乡县"
},
{
"areaId": 2021,
"areaName": "隆尧县"
},
{
"areaId": 2025,
"areaName": "宁晋县"
},
{
"areaId": 2018,
"areaName": "巨鹿县"
},
{
"areaId": 2033,
"areaName": "新河县"
},
{
"areaId": 2017,
"areaName": "广宗县"
},
{
"areaId": 2026,
"areaName": "平乡县"
},
{
"areaId": 2032,
"areaName": "威县"
},
{
"areaId": 2029,
"areaName": "清河县"
},
{
"areaId": 2020,
"areaName": "临西县"
},
{
"areaId": 2023,
"areaName": "南宫市"
},
{
"areaId": 2031,
"areaName": "沙河市"
}
],
"cityName": "邢台市",
"cityId": 245
},
{
"area": [
{
"areaId": 225,
"areaName": "长安区"
},
{
"areaId": 227,
"areaName": "桥西区"
},
{
"areaId": 228,
"areaName": "新华区"
},
{
"areaId": 230,
"areaName": "井陉矿区"
},
{
"areaId": 229,
"areaName": "裕华区"
},
{
"areaId": 232,
"areaName": "藁城区"
},
{
"areaId": 235,
"areaName": "鹿泉区"
},
{
"areaId": 238,
"areaName": "栾城区"
},
{
"areaId": 236,
"areaName": "井陉县"
},
{
"areaId": 237,
"areaName": "正定县"
},
{
"areaId": 239,
"areaName": "行唐县"
},
{
"areaId": 240,
"areaName": "灵寿县"
},
{
"areaId": 241,
"areaName": "高邑县"
},
{
"areaId": 242,
"areaName": "深泽县"
},
{
"areaId": 243,
"areaName": "赞皇县"
},
{
"areaId": 244,
"areaName": "无极县"
},
{
"areaId": 245,
"areaName": "平山县"
},
{
"areaId": 246,
"areaName": "元氏县"
},
{
"areaId": 247,
"areaName": "赵县"
},
{
"areaId": 3265,
"areaName": "石家庄高新技术产业开发区"
},
{
"areaId": 231,
"areaName": "辛集市"
},
{
"areaId": 233,
"areaName": "晋州市"
},
{
"areaId": 234,
"areaName": "新乐市"
}
],
"cityName": "石家庄市",
"cityId": 37
},
{
"area": [
{
"areaId": 661,
"areaName": "邯山区"
},
{
"areaId": 662,
"areaName": "丛台区"
},
{
"areaId": 663,
"areaName": "复兴区"
},
{
"areaId": 664,
"areaName": "峰峰矿区"
},
{
"areaId": 672,
"areaName": "肥乡区"
},
{
"areaId": 673,
"areaName": "永年区"
},
{
"areaId": 667,
"areaName": "临漳县"
},
{
"areaId": 668,
"areaName": "成安县"
},
{
"areaId": 669,
"areaName": "大名县"
},
{
"areaId": 670,
"areaName": "涉县"
},
{
"areaId": 671,
"areaName": "磁县"
},
{
"areaId": 674,
"areaName": "邱县"
},
{
"areaId": 675,
"areaName": "鸡泽县"
},
{
"areaId": 676,
"areaName": "广平县"
},
{
"areaId": 677,
"areaName": "馆陶县"
},
{
"areaId": 678,
"areaName": "魏县"
},
{
"areaId": 679,
"areaName": "曲周县"
},
{
"areaId": 665,
"areaName": "武安市"
}
],
"cityName": "邯郸市",
"cityId": 38
},
{
"area": [
{
"areaId": 1132,
"areaName": "竞秀区"
},
{
"areaId": 1114,
"areaName": "莲池区"
},
{
"areaId": 1124,
"areaName": "满城区"
},
{
"areaId": 1126,
"areaName": "清苑区"
},
{
"areaId": 1121,
"areaName": "涞水县"
},
{
"areaId": 1118,
"areaName": "阜平县"
},
{
"areaId": 1134,
"areaName": "徐水区"
},
{
"areaId": 1116,
"areaName": "定兴县"
},
{
"areaId": 1130,
"areaName": "唐县"
},
{
"areaId": 1120,
"areaName": "高阳县"
},
{
"areaId": 1122,
"areaName": "涞源县"
},
{
"areaId": 1131,
"areaName": "望都县"
},
{
"areaId": 1135,
"areaName": "易县"
},
{
"areaId": 1127,
"areaName": "曲阳县"
},
{
"areaId": 1123,
"areaName": "蠡县"
},
{
"areaId": 1129,
"areaName": "顺平县"
},
{
"areaId": 1115,
"areaName": "博野县"
},
{
"areaId": 3296,
"areaName": "保定白沟新城"
},
{
"areaId": 1136,
"areaName": "涿州市"
},
{
"areaId": 1117,
"areaName": "定州市"
},
{
"areaId": 1112,
"areaName": "安国市"
},
{
"areaId": 1119,
"areaName": "高碑店市"
},
{
"areaId": 3268,
"areaName": "雄安新区"
}
],
"cityName": "保定市",
"cityId": 39
},
{
"area": [
{
"areaId": 1143,
"areaName": "桥东区"
},
{
"areaId": 1144,
"areaName": "桥西区"
},
{
"areaId": 1148,
"areaName": "下花园区"
},
{
"areaId": 1146,
"areaName": "万全区"
},
{
"areaId": 1138,
"areaName": "崇礼区"
},
{
"areaId": 1152,
"areaName": "张北县"
},
{
"areaId": 1142,
"areaName": "康保县"
},
{
"areaId": 1139,
"areaName": "沽源县"
},
{
"areaId": 1145,
"areaName": "尚义县"
},
{
"areaId": 1147,
"areaName": "蔚县"
},
{
"areaId": 1151,
"areaName": "阳原县"
},
{
"areaId": 1140,
"areaName": "怀安县"
},
{
"areaId": 1141,
"areaName": "怀来县"
},
{
"areaId": 1153,
"areaName": "涿鹿县"
},
{
"areaId": 1137,
"areaName": "赤城县"
},
{
"areaId": 3264,
"areaName": "张家口市察北管理区"
},
{
"areaId": 1149,
"areaName": "宣化区"
}
],
"cityName": "张家口市",
"cityId": 40
},
{
"area": [
{
"areaId": 1161,
"areaName": "双桥区"
},
{
"areaId": 1160,
"areaName": "双滦区"
},
{
"areaId": 1164,
"areaName": "鹰手营子矿区"
},
{
"areaId": 1154,
"areaName": "承德县"
},
{
"areaId": 1163,
"areaName": "兴隆县"
},
{
"areaId": 1158,
"areaName": "滦平县"
},
{
"areaId": 1157,
"areaName": "隆化县"
},
{
"areaId": 1155,
"areaName": "丰宁满族自治县"
},
{
"areaId": 1156,
"areaName": "宽城满族自治县"
},
{
"areaId": 1162,
"areaName": "围场满族蒙古族自治县"
},
{
"areaId": 1159,
"areaName": "平泉市"
}
],
"cityName": "承德市",
"cityId": 41
},
{
"area": [
{
"areaId": 612,
"areaName": "路南区"
},
{
"areaId": 613,
"areaName": "路北区"
},
{
"areaId": 614,
"areaName": "古冶区"
},
{
"areaId": 615,
"areaName": "开平区"
},
{
"areaId": 616,
"areaName": "丰南区"
},
{
"areaId": 617,
"areaName": "丰润区"
},
{
"areaId": 1165,
"areaName": "曹妃甸区"
},
{
"areaId": 621,
"areaName": "滦南县"
},
{
"areaId": 622,
"areaName": "乐亭县"
},
{
"areaId": 623,
"areaName": "迁西县"
},
{
"areaId": 624,
"areaName": "玉田县"
},
{
"areaId": 3220,
"areaName": "河北唐山芦台经济开发区"
},
{
"areaId": 3217,
"areaName": "唐山市汉沽管理区"
},
{
"areaId": 3218,
"areaName": "唐山高新技术产业开发区"
},
{
"areaId": 3219,
"areaName": "河北唐山海港经济开发区"
},
{
"areaId": 618,
"areaName": "遵化市"
},
{
"areaId": 619,
"areaName": "迁安市"
},
{
"areaId": 620,
"areaName": "滦州市"
}
],
"cityName": "唐山市",
"cityId": 42
},
{
"area": [
{
"areaId": 1166,
"areaName": "安次区"
},
{
"areaId": 1171,
"areaName": "广阳区"
},
{
"areaId": 1170,
"areaName": "固安县"
},
{
"areaId": 1175,
"areaName": "永清县"
},
{
"areaId": 1174,
"areaName": "香河县"
},
{
"areaId": 1169,
"areaName": "大城县"
},
{
"areaId": 1173,
"areaName": "文安县"
},
{
"areaId": 1168,
"areaName": "大厂回族自治县"
},
{
"areaId": 1167,
"areaName": "霸州市"
},
{
"areaId": 1172,
"areaName": "三河市"
}
],
"cityName": "廊坊市",
"cityId": 43
},
{
"area": [
{
"areaId": 1189,
"areaName": "新华区"
},
{
"areaId": 1191,
"areaName": "运河区"
},
{
"areaId": 1177,
"areaName": "沧县"
},
{
"areaId": 1184,
"areaName": "青县"
},
{
"areaId": 1178,
"areaName": "东光县"
},
{
"areaId": 1179,
"areaName": "海兴县"
},
{
"areaId": 1190,
"areaName": "盐山县"
},
{
"areaId": 1186,
"areaName": "肃宁县"
},
{
"areaId": 1183,
"areaName": "南皮县"
},
{
"areaId": 1187,
"areaName": "吴桥县"
},
{
"areaId": 1188,
"areaName": "献县"
},
{
"areaId": 1182,
"areaName": "孟村回族自治县"
},
{
"areaId": 1176,
"areaName": "泊头市"
},
{
"areaId": 1185,
"areaName": "任丘市"
},
{
"areaId": 1181,
"areaName": "黄骅市"
},
{
"areaId": 1180,
"areaName": "河间市"
}
],
"cityName": "沧州市",
"cityId": 44
},
{
"area": [
{
"areaId": 680,
"areaName": "海港区"
},
{
"areaId": 681,
"areaName": "山海关区"
},
{
"areaId": 682,
"areaName": "北戴河区"
},
{
"areaId": 683,
"areaName": "青龙满族自治县"
},
{
"areaId": 684,
"areaName": "昌黎县"
},
{
"areaId": 685,
"areaName": "抚宁区"
},
{
"areaId": 686,
"areaName": "卢龙县"
},
{
"areaId": 3204,
"areaName": "秦皇岛市经济技术开发区"
},
{
"areaId": 687,
"areaName": "北戴河新区"
}
],
"cityName": "秦皇岛市",
"cityId": 47
}
],
"provinceName": "河北省",
"provinceId": 9
}
]