{
    "observations":[
    {
        "stationID": "$station.location",
        "softwareType": "weewx $station.version",
        "realtimeFrequency": "$current.interval",
        #if $current.radiation.has_data
        "solarRadiation": $current.radiation.raw,
        #end if
        #if $current.rain.raw > 0
        "rainbool": true,
        #else
        "rainbool": false,
        #end if
        "lon": $station.stn_info.longitude_f,
        "epoch": $current.dateTime.raw,
        "lat": $station.stn_info.latitude_f,
        #if $current.UV.has_data
        "uv": $current.UV,
        #end if
        #if $current.windDir.has_data
        "winddir": $current.windDir.raw,
        #end if
        #if $current.outHumidity.has_data
        "humidity": $current.outHumidity.raw,
        #end if
        #if $current.o3.has_data
        "o3": $current.o3.raw
        #end if
        "imperial": {
                        #if $current.outTemp.has_data
                        "temp": $current.outTemp.degree_F.raw,
                        #end if
                        #if $day.outTemp.has_data
                        "maxtemp": $day.outTemp.max.degree_F.raw,
                        "mintemp": $day.outTemp.min.degree_F.raw,
                        #end if
                        #if $current.appTemp.has_data
                        "apptemp": $current.appTemp.degree_F.raw,
                        #end if
                        #if $current.dewpoint.has_data
                        "dewpt": $current.dewpoint.degree_F.raw,
                        #end if
                        #if $current.windSpeed.has_data
                        "windSpeed": $current.windSpeed.mile_per_hour.raw,
                        #end if
                        #if $current.windGust.has_data
                        "windGust": $current.windGust.mile_per_hour.raw,
                        #end if
                        #if $current.barometer.has_data
                        "pressure": $current.barometer.inHg.raw,
                        #end if
                        #if $hour.rain.has_data
                        "precip1h": $hour($hours_ago=1).rain.sum.inch.raw,
                        #end if
                        #if $current.rainRate.has_data
                        "precipRate": $current.rainRate.inch_per_hour.raw,
                        #end if
                        #if $day.rain.has_data
                        "rainday": $day.rain.sum.inch.raw
                        #end if
        },
        "metric": {
                        #if $current.outTemp.has_data
                        "temp": $current.outTemp.degree_C.raw,
                        #end if
                        #if $day.outTemp.has_data
                        "maxtemp": $day.outTemp.max.degree_C.raw,
                        "mintemp": $day.outTemp.min.degree_C.raw,
                        #end if
                        #if $current.appTemp.has_data
                        "apptemp": $current.appTemp.degree_C.raw,
                        #end if
                        #if $current.dewpoint.has_data
                        "dewpt": $current.dewpoint.degree_C.raw,
                        #end if
                        #if $current.windSpeed.has_data
                        "windSpeed": $current.windSpeed.km_per_hour.raw,
                        #end if
                        #if $current.windGust.has_data
                        "windGust": $current.windGust.km_per_hour.raw,
                        #end if
                        #if $current.barometer.has_data
                        "pressure": $current.barometer.mbar.raw,
                        #end if
                        #if $hour.rain.has_data
                        "precip1h": $hour($hours_ago=1).rain.sum.mm.raw,
                        #end if
                        #if $current.rainRate.has_data
                        "precipRate": $current.rainRate.mm_per_hour.raw,
                        #end if
                        #if $day.rain.has_data
                        "rainday": $day.rain.sum.mm.raw
                        #end if
        },
        "metric_si": {
                        #if $current.outTemp.has_data
                        "temp": $current.outTemp.degree_C.raw,
                        #end if
                        #if $day.outTemp.has_data
                        "maxtemp": $day.outTemp.max.degree_C.raw,
                        "mintemp": $day.outTemp.min.degree_C.raw,
                        #end if
                        #if $current.appTemp.has_data
                        "apptemp": $current.appTemp.degree_C.raw,
                        #end if
                        #if $current.dewpoint.has_data
                        "dewpt": $current.dewpoint.degree_C.raw,
                        #end if
                        #if $current.windSpeed.has_data
                        "windSpeed": $current.windSpeed.meter_per_second.raw,
                        #end if
                        #if $current.windGust.has_data
                        "windGust": $current.windGust.meter_per_second.raw,
                        #end if
                        #if $current.barometer.has_data
                        "pressure": $current.barometer.mbar.raw,
                        #end if
                        #if $hour.rain.has_data
                        "precip1h": $hour($hours_ago=1).rain.sum.mm.raw,
                        #end if
                        #if $current.rainRate.has_data
                        "precipRate": $current.rainRate.mm_per_hour.raw,
                        #end if
                        #if $day.rain.has_data
                        "rainday": $day.rain.sum.mm.raw
                        #end if
        },
        "uk_hybrid": {
                        #if $current.outTemp.has_data
                        "temp": $current.outTemp.degree_C.raw,
                        #end if
                        #if $day.outTemp.has_data
                        "maxtemp": $day.outTemp.max.degree_C.raw,
                        "mintemp": $day.outTemp.min.degree_C.raw,
                        #end if
                        #if $current.appTemp.has_data
                        "apptemp": $current.appTemp.degree_C.raw,
                        #end if
                        #if $current.dewpoint.has_data
                        "dewpt": $current.dewpoint.degree_C.raw,
                        #end if
                        #if $current.windSpeed.has_data
                        "windSpeed": $current.windSpeed.mile_per_hour.raw,
                        #end if
                        #if $current.windGust.has_data
                        "windGust": $current.windGust.mile_per_hour.raw,
                        #end if
                        #if $current.barometer.has_data
                        "pressure": $current.barometer.mbar.raw,
                        #end if
                        #if $hour.rain.has_data
                        "precip1h": $hour($hours_ago=1).rain.sum.mm.raw,
                        #end if
                        #if $current.rainRate.has_data
                        "precipRate": $current.rainRate.mm_per_hour.raw,
                        #end if
                        #if $day.rain.has_data
                        "rainday": $day.rain.sum.mm.raw
                        #end if
        }
    }
    ]
}