[Software]XMLからJSONへ変更

http://tm-webtools.com/Tools/XmlJson

XML

<?xml version="1.0" encoding="UTF-8"?>
<YDF xmlns="http://olp.yahooapis.jp/ydf/1.0" firstResultPosition="1" totalResultsAvailable="1" totalResultsReturned="1">
	<ResultInfo>
		<Count>1</Count>
		<Total>1</Total>
		<Start>1</Start>
		<Status>200</Status>
		<Latency>0.006577</Latency>
		<Description></Description>
		<Copyright>(C) Yahoo Japan Corporation.</Copyright>
	</ResultInfo>
	<Feature>
		<Id>201909111545_35.663613_139.73229</Id>
		<Name>地点(35.663613,
139.73229)の2019年09月11日 15時45分から60分間の天気情報</Name>
		<Geometry>
			<Type>point</Type>
			<Coordinates>35.663613,
139.73229</Coordinates>
		</Geometry>
		<Property>
					<WeatherAreaCode />
			<WeatherList>
				<Weather>
					<Type>observation</Type>
					<Date>201909111545</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111555</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111605</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111615</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111625</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111635</Date>
					<Rainfall />
				</Weather>
				<Weather>
					<Type>forecast</Type>
					<Date>201909111645</Date>
					<Rainfall />
				</Weather>
			</WeatherList>
		</Property>
	</Feature>
</YDF>

JSON

{
  "?xml": {
    "@version": "1.0",
    "@encoding": "UTF-8"
  },
  "YDF": {
    "@xmlns": "http://olp.yahooapis.jp/ydf/1.0",
    "@firstResultPosition": "1",
    "@totalResultsAvailable": "1",
    "@totalResultsReturned": "1",
    "ResultInfo": {
      "Count": "1",
      "Total": "1",
      "Start": "1",
      "Status": "200",
      "Latency": "0.006577",
      "Description": "",
      "Copyright": "(C) Yahoo Japan Corporation."
    },
    "Feature": {
      "Id": "201909111545_35.663613_139.73229",
      "Name": "地点(35.663613,\n139.73229)の2019年09月11日 15時45分から60分間の天気情報",
      "Geometry": {
        "Type": "point",
        "Coordinates": "35.663613,\n139.73229"
      },
      "Property": {
        "WeatherAreaCode": null,
        "WeatherList": {
          "Weather": [
            {
              "Type": "observation",
              "Date": "201909111545",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111555",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111605",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111615",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111625",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111635",
              "Rainfall": null
            },
            {
              "Type": "forecast",
              "Date": "201909111645",
              "Rainfall": null
            }
          ]
        }
      }
    }
  }
}

投稿者: kinkun

保有資格 Salesforce Certified Platform App Builder T Salesforce Certified Platform Developer I Salesforce Certified Platform Developer II Salesforce Certified Administrator

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です