我申請了一份工作,並得到了一些測試。它非常簡單,但我必須處理他們提供的格式不正確的JSON對象。做的JSON對象需要格式正確嗎?
我不知道這是否正常(我對JSON很新穎)? (OK意味着我仍然可以將它用作標準的JSON對象)。
這裏是JSON字符串:
{"title": "Carbon Market Trader EU",
"link": "cmteu",
"children": [
{"title": "Analysis",
"link": "analysis",
"children": [
{"title": "Daily Reports",
"link": "daily",
"children": [
{"title": "Forward",
"link": "fwd",
"children": [
{"title": "Morning Report", "link": "morning"},
{"title": "Benchmark", "link": "bench"}
]}
]},
{"title": "Weekly Reports",
"link": "weekly",
"children": [
{"title": "Forward",
"link": "fwd",
"children": [
{"title": "Weekly Report","link": "weekly"}
]}
]},
{"title": "Monthly Reports","link": "mth"},
{"title": "Price Forecasts",
"link": "pfc",
"children": [
{"title": "Price Forecasts","link": "pfc"},
{"title": "Supply and Demand","link": "sad"}
]},
{"title": "Policy Updates","link": "pup"},
{"title": "Analyst Updates","link": "aup"},
{"title": "Carbon Market Brief","link": "cmb"},
{"title": "Report Library","link": "ml"},
{"title": "Reuters Insider","link": "ri"},
{"title": "Market Indicators",
"link": "mi",
"children": [
{"title": "Overview","link": "overview"},
{"title": "Breakdown",
"link": "breakdown"
"children": [
{"title": "Cross Commodity Indicators","link": "cci"},
{"title": "Technical Indicators","link": "ti"},
{"title": "Fundamental Indicators","link": "fi"},
{"title": "Information Indicators","link": "ii"}
]}
]}
]},
{"title": "Supply",
"link": "supply",
"children": [
{"title": "Cap","link": "cap"},
{"title": "Overview","link": "overview"},
{"title": "Reserves","link": "reserves"}
]},
{"title": "Demand",
"link": "demand",
"children": [
{"title": "Emissions Forecast","link": "ef"},
{"title": "Power and Heat Emissions","link": "phe"},
{"title": "Industry Emissions","link": "ie"}
]},
{"title": "Market Data",
"link": "md",
"children": [
{"title": "Carbon",
"link": "carbon",
"children": [
{"title": "Forward",
"link": "fwd",
"children": [
{"title": "EUA","link": "eua"},
{"title": "sCER","link": "cer"},
{"title": "RGA","link": "rga"}
]}
]},
{"title": "Coal",
"link": "coal",
"children": [
{"title": "Forward",
"link": "fwd",
"children": [
{"title": "API-2","link": "api"}
]}
]},
{"title": "Crude oil",
"link": "crude",
"children": [
{"title": "Forward",
"link": "fwd",
"children": [
{"title": "Brent","link": "brent"}
]}
]}
]}
]}
http://jsonlint.com – BalusC