I'm trying to read a JSON file in but having problems understanding why I can't read the full data as I get an error the JSON is below, sorry is so long
but if I try a For I = 1 to 5 I can't read the last day entry, and if I manually Map to 5 I get the same error,
i.e.
Why ?
error
main$ResumableSub_Downloadresume (java line: 859)
java.lang.ArrayIndexOutOfBoundsException: length=5; index=5
And it's the same when trying to get the data from Hour 0 to 7, if I do a For y = 0 to 6 it's okay but try For y = 0 to 7 and I get a similar error
- location: Rhyl [Denbighshire;United Kingdom]
- day
- 1
- date: 20200830
- rain: 0
- symbol_value: 2
- uv_index_max: 4
- snowline: 2400
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1021
- units
- rain: mm
- temp: °C
- snowline: m
- pressure: mb
- wind: km/h
- sun
- in: 06:19
- mid: 13:13
- out: 20:07
- tempmax: 15
- local_time_offset: 1
- moon
- symbol: 12
- in: 19:33
- lumi: 92.37%
- out: 02:32
- desc: First Quarter, 92.37% Illuminated
- month:
- local_time: 20:09
- hour
- 0
- rain: 0
- temp: 11
- symbol_value: 3
- snowline: 2400
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1019
- clouds: 32%
- uv_index: 0
- symbol_value2: 3
- humidity: 72
- interval: 02:00
- windchill: 11
- wind
- symbol: 10
- gusts: 35
- dir: NE
- speed: 16
- symbolB: 42
- 1
- rain: 0
- temp: 12
- symbol_value: 2
- snowline: 2500
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1020
- clouds: 19%
- uv_index: 0
- symbol_value2: 2
- humidity: 74
- interval: 05:00
- windchill: 12
- wind
- symbol: 10
- gusts: 29
- dir: NE
- speed: 12
- symbolB: 42
- 2
- rain: 0
- temp: 12
- symbol_value: 2
- snowline: 2700
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1020
- clouds: 12%
- uv_index: 1
- symbol_value2: 2
- humidity: 73
- interval: 08:00
- windchill: 12
- wind
- symbol: 10
- gusts: 24
- dir: NE
- speed: 10
- symbolB: 34
- 3
- rain: 0
- temp: 14
- symbol_value: 2
- snowline: 2900
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1021
- clouds: 30%
- uv_index: 3
- symbol_value2: 2
- humidity: 65
- interval: 11:00
- windchill: 14
- wind
- symbol: 9
- gusts: 24
- dir: N
- speed: 11
- symbolB: 33
- 4
- rain: 0
- temp: 14
- symbol_value: 3
- snowline: 3000
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1021
- clouds: 67%
- uv_index: 3
- symbol_value2: 3
- humidity: 63
- interval: 14:00
- windchill: 14
- wind
- symbol: 9
- gusts: 25
- dir: N
- speed: 11
- symbolB: 33
- 5
- rain: 0
- temp: 14
- symbol_value: 3
- snowline: 3200
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1021
- clouds: 66%
- uv_index: 1
- symbol_value2: 3
- humidity: 70
- interval: 17:00
- windchill: 14
- wind
- symbol: 16
- gusts: 25
- dir: NW
- speed: 9
- symbolB: 40
- 6
- rain: 0
- temp: 13
- symbol_value: 2
- snowline: 3300
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1021
- clouds: 28%
- uv_index: 0
- symbol_value2: 2
- humidity: 73
- interval: 20:00
- windchill: 13
- wind
- symbol: 7
- gusts: 19
- dir: W
- speed: 4
- symbolB: 31
- 7
- rain: 0
- temp: 12
- symbol_value: 2
- snowline: 3200
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1022
- clouds: 14%
- uv_index: 0
- symbol_value2: 2
- humidity: 78
- interval: 23:00
- windchill: 12
- wind
- symbol: 6
- gusts: 11
- dir: SW
- speed: 4
- symbolB: 22
- 0
- name: Sunday
- symbol_value2: 2
- humidity: 71
- tempmin: 10
- wind
- symbol: 10
- gusts: 38
- speed: 16
- symbolB: 42
- 2
- date: 20200831
- rain: 0
- symbol_value: 3
- uv_index_max: 3
- snowline: 3200
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1021
- units
- rain: mm
- temp: °C
- snowline: m
- pressure: mb
- wind: km/h
- sun
- in: 06:21
- mid: 13:13
- out: 20:04
- tempmax: 17
- local_time_offset: 1
- moon
- symbol: 12
- in: 20:00
- lumi: 96.81%
- out: 03:43
- desc: First Quarter, 96.81% Illuminated
- month:
- local_time: 20:09
- hour
- 0
- rain: 0
- temp: 10
- symbol_value: 2
- snowline: 3300
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1021
- clouds: 21%
- uv_index: 0
- symbol_value2: 2
- humidity: 90
- interval: 02:00
- windchill: 9
- wind
- symbol: 5
- gusts: 17
- dir: S
- speed: 9
- symbolB: 29
- 1
- rain: 0
- temp: 10
- symbol_value: 2
- snowline: 3300
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1021
- clouds: 27%
- uv_index: 0
- symbol_value2: 2
- humidity: 87
- interval: 05:00
- windchill: 8
- wind
- symbol: 13
- gusts: 20
- dir: S
- speed: 10
- symbolB: 37
- 2
- rain: 0
- temp: 11
- symbol_value: 2
- snowline: 3300
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1022
- clouds: 16%
- uv_index: 1
- symbol_value2: 2
- humidity: 76
- interval: 08:00
- windchill: 11
- wind
- symbol: 13
- gusts: 22
- dir: S
- speed: 10
- symbolB: 37
- 3
- rain: 0
- temp: 15
- symbol_value: 3
- snowline: 3400
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1022
- clouds: 33%
- uv_index: 2
- symbol_value2: 3
- humidity: 62
- interval: 11:00
- windchill: 15
- wind
- symbol: 14
- gusts: 20
- dir: SW
- speed: 3
- symbolB: 38
- 4
- rain: 0
- temp: 16
- symbol_value: 4
- snowline: 3600
- symbol_description: Overcast
- symbol_description2: Overcast
- pressure: 1021
- clouds: 94%
- uv_index: 2
- symbol_value2: 4
- humidity: 59
- interval: 14:00
- windchill: 16
- wind
- symbol: 1
- gusts: 16
- dir: N
- speed: 4
- symbolB: 25
- 5
- rain: 0
- temp: 16
- symbol_value: 4
- snowline: 3700
- symbol_description: Overcast
- symbol_description2: Overcast
- pressure: 1021
- clouds: 87%
- uv_index: 1
- symbol_value2: 4
- humidity: 63
- interval: 17:00
- windchill: 16
- wind
- symbol: 2
- gusts: 14
- dir: NE
- speed: 4
- symbolB: 26
- 6
- rain: 0
- temp: 15
- symbol_value: 3
- snowline: 3700
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1020
- clouds: 67%
- uv_index: 0
- symbol_value2: 3
- humidity: 69
- interval: 20:00
- windchill: 15
- wind
- symbol: 4
- gusts: 15
- dir: SE
- speed: 3
- symbolB: 28
- 7
- rain: 0
- temp: 14
- symbol_value: 3
- snowline: 3600
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1021
- clouds: 82%
- uv_index: 0
- symbol_value2: 3
- humidity: 71
- interval: 23:00
- windchill: 14
- wind
- symbol: 6
- gusts: 18
- dir: SW
- speed: 10
- symbolB: 30
- 0
- name: Monday
- symbol_value2: 3
- humidity: 72
- tempmin: 9
- wind
- symbol: 13
- gusts: 22
- speed: 11
- symbolB: 37
- 3
- date: 20200901
- rain: 0
- symbol_value: 3
- uv_index_max: 2
- snowline: 3400
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1019
- units
- rain: mm
- temp: °C
- snowline: m
- pressure: mb
- wind: km/h
- sun
- in: 06:22
- mid: 13:13
- out: 20:02
- tempmax: 18
- local_time_offset: 1
- moon
- symbol: 13
- in: 20:21
- lumi: 99.27%
- out: 04:57
- desc: Full Moon, 99.27% Illuminated
- month:
- local_time: 20:09
- hour
- 0
- rain: 0
- temp: 14
- symbol_value: 4
- snowline: 3600
- symbol_description: Overcast
- symbol_description2: Overcast
- pressure: 1021
- clouds: 96%
- uv_index: 0
- symbol_value2: 4
- humidity: 74
- interval: 01:00
- windchill: 14
- wind
- symbol: 5
- gusts: 18
- dir: S
- speed: 8
- symbolB: 29
- 1
- rain: 0
- temp: 12
- symbol_value: 2
- snowline: 3600
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1020
- clouds: 22%
- uv_index: 0
- symbol_value2: 2
- humidity: 82
- interval: 04:00
- windchill: 12
- wind
- symbol: 5
- gusts: 19
- dir: S
- speed: 10
- symbolB: 29
- 2
- rain: 0
- temp: 11
- symbol_value: 2
- snowline: 3600
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1020
- clouds: 12%
- uv_index: 0
- symbol_value2: 2
- humidity: 87
- interval: 07:00
- windchill: 11
- wind
- symbol: 13
- gusts: 22
- dir: S
- speed: 12
- symbolB: 37
- 3
- rain: 0
- temp: 15
- symbol_value: 1
- snowline: 3600
- symbol_description: Sunny
- symbol_description2: Sunny
- pressure: 1021
- clouds: 9%
- uv_index: 2
- symbol_value2: 1
- humidity: 66
- interval: 10:00
- windchill: 15
- wind
- symbol: 13
- gusts: 23
- dir: S
- speed: 10
- symbolB: 37
- 4
- rain: 0
- temp: 18
- symbol_value: 3
- snowline: 3500
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1020
- clouds: 95%
- uv_index: 2
- symbol_value2: 3
- humidity: 56
- interval: 13:00
- windchill: 18
- wind
- symbol: 14
- gusts: 21
- dir: SW
- speed: 5
- symbolB: 38
- 5
- rain: 0
- temp: 17
- symbol_value: 3
- snowline: 3400
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1019
- clouds: 59%
- uv_index: 2
- symbol_value2: 3
- humidity: 63
- interval: 16:00
- windchill: 17
- wind
- symbol: 2
- gusts: 19
- dir: NE
- speed: 3
- symbolB: 26
- 6
- rain: 0
- temp: 17
- symbol_value: 2
- snowline: 3700
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1018
- clouds: 11%
- uv_index: 0
- symbol_value2: 2
- humidity: 70
- interval: 19:00
- windchill: 17
- wind
- symbol: 4
- gusts: 16
- dir: SE
- speed: 4
- symbolB: 28
- 7
- rain: 0
- temp: 14
- symbol_value: 2
- snowline: 3900
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1018
- clouds: 17%
- uv_index: 0
- symbol_value2: 2
- humidity: 79
- interval: 22:00
- windchill: 14
- wind
- symbol: 5
- gusts: 19
- dir: S
- speed: 11
- symbolB: 29
- 0
- name: Tuesday
- symbol_value2: 3
- humidity: 72
- tempmin: 11
- wind
- symbol: 13
- gusts: 23
- speed: 12
- symbolB: 37
- 4
- date: 20200902
- rain: 9.1
- symbol_value: 9
- uv_index_max: 3
- snowline: 3900
- symbol_description: Cloudy with heavy rain shower
- symbol_description2: Cloudy with heavy rain shower
- pressure: 1013
- units
- rain: mm
- temp: °C
- snowline: m
- pressure: mb
- wind: km/h
- sun
- in: 06:24
- mid: 13:12
- out: 20:00
- tempmax: 18
- local_time_offset: 1
- moon
- symbol: 14
- in: 20:38
- lumi: 99.77%
- out: 06:10
- desc: Full Moon, 99.77% Illuminated
- month:
- local_time: 20:09
- hour
- 0
- rain: 0
- temp: 14
- symbol_value: 2
- snowline: 3900
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1018
- clouds: 16%
- uv_index: 0
- symbol_value2: 2
- humidity: 75
- interval: 01:00
- windchill: 14
- wind
- symbol: 13
- gusts: 25
- dir: S
- speed: 13
- symbolB: 37
- 1
- rain: 0
- temp: 13
- symbol_value: 2
- snowline: 4100
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1016
- clouds: 33%
- uv_index: 0
- symbol_value2: 2
- humidity: 83
- interval: 04:00
- windchill: 13
- wind
- symbol: 13
- gusts: 28
- dir: S
- speed: 15
- symbolB: 37
- 2
- rain: 0
- temp: 13
- symbol_value: 2
- snowline: 4100
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1016
- clouds: 39%
- uv_index: 0
- symbol_value2: 2
- humidity: 84
- interval: 07:00
- windchill: 13
- wind
- symbol: 13
- gusts: 29
- dir: S
- speed: 16
- symbolB: 45
- 3
- rain: 0
- temp: 17
- symbol_value: 2
- snowline: 4100
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1014
- clouds: 55%
- uv_index: 2
- symbol_value2: 2
- humidity: 73
- interval: 10:00
- windchill: 17
- wind
- symbol: 13
- gusts: 44
- dir: S
- speed: 23
- symbolB: 53
- 4
- rain: 2
- temp: 17
- symbol_value: 7
- snowline: 4000
- symbol_description: Overcast with light rain
- symbol_description2: Overcast with light rain
- pressure: 1013
- clouds: 100%
- uv_index: 3
- symbol_value2: 7
- humidity: 83
- interval: 13:00
- windchill: 17
- wind
- symbol: 13
- gusts: 47
- dir: S
- speed: 21
- symbolB: 53
- 5
- rain: 4.2
- temp: 16
- symbol_value: 9
- snowline: 4100
- symbol_description: Cloudy with heavy rain shower
- symbol_description2: Cloudy with heavy rain shower
- pressure: 1011
- clouds: 95%
- uv_index: 2
- symbol_value2: 9
- humidity: 86
- interval: 16:00
- windchill: 16
- wind
- symbol: 13
- gusts: 45
- dir: S
- speed: 24
- symbolB: 53
- 6
- rain: 1.4
- temp: 17
- symbol_value: 6
- snowline: 4100
- symbol_description: Cloudy with light rain shower
- symbol_description2: Cloudy with light rain shower
- pressure: 1010
- clouds: 74%
- uv_index: 0
- symbol_value2: 6
- humidity: 85
- interval: 19:00
- windchill: 17
- wind
- symbol: 13
- gusts: 46
- dir: S
- speed: 23
- symbolB: 53
- 7
- rain: 1.5
- temp: 17
- symbol_value: 6
- snowline: 4100
- symbol_description: Cloudy with light rain shower
- symbol_description2: Cloudy with light rain shower
- pressure: 1010
- clouds: 87%
- uv_index: 0
- symbol_value2: 6
- humidity: 87
- interval: 22:00
- windchill: 17
- wind
- symbol: 13
- gusts: 45
- dir: S
- speed: 20
- symbolB: 53
- 0
- name: Wednesday
- symbol_value2: 9
- humidity: 82
- tempmin: 13
- wind
- symbol: 13
- gusts: 47
- speed: 24
- symbolB: 53
- 5
- date: 20200903
- rain: 1.3
- symbol_value: 6
- uv_index_max: 4
- snowline: 3500
- symbol_description: Cloudy with light rain shower
- symbol_description2: Cloudy with light rain shower
- pressure: 1012
- units
- rain: mm
- temp: °C
- snowline: m
- pressure: mb
- wind: km/h
- sun
- in: 06:26
- mid: 13:12
- out: 19:57
- tempmax: 19
- local_time_offset: 1
- moon
- symbol: 15
- in: 20:53
- lumi: 98.36%
- out: 07:21
- desc: Full Moon, 98.36% Illuminated
- month:
- local_time: 20:09
- hour
- 0
- rain: 0.8
- temp: 18
- symbol_value: 6
- snowline: 4200
- symbol_description: Cloudy with light rain shower
- symbol_description2: Cloudy with light rain shower
- pressure: 1010
- clouds: 67%
- uv_index: 0
- symbol_value2: 6
- humidity: 88
- interval: 01:00
- windchill: 18
- wind
- symbol: 14
- gusts: 38
- dir: SW
- speed: 17
- symbolB: 46
- 1
- rain: 0.2
- temp: 17
- symbol_value: 6
- snowline: 4100
- symbol_description: Cloudy with light rain shower
- symbol_description2: Cloudy with light rain shower
- pressure: 1010
- clouds: 91%
- uv_index: 0
- symbol_value2: 6
- humidity: 91
- interval: 04:00
- windchill: 17
- wind
- symbol: 15
- gusts: 31
- dir: W
- speed: 14
- symbolB: 47
- 2
- rain: 0
- temp: 16
- symbol_value: 2
- snowline: 3900
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1011
- clouds: 43%
- uv_index: 0
- symbol_value2: 2
- humidity: 91
- interval: 07:00
- windchill: 16
- wind
- symbol: 14
- gusts: 24
- dir: SW
- speed: 13
- symbolB: 38
- 3
- rain: 0
- temp: 17
- symbol_value: 2
- snowline: 4000
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1012
- clouds: 26%
- uv_index: 2
- symbol_value2: 2
- humidity: 77
- interval: 10:00
- windchill: 17
- wind
- symbol: 14
- gusts: 36
- dir: SW
- speed: 20
- symbolB: 46
- 4
- rain: 0
- temp: 19
- symbol_value: 2
- snowline: 3900
- symbol_description: Sunny intervals
- symbol_description2: Sunny intervals
- pressure: 1013
- clouds: 46%
- uv_index: 4
- symbol_value2: 2
- humidity: 66
- interval: 13:00
- windchill: 19
- wind
- symbol: 14
- gusts: 43
- dir: SW
- speed: 22
- symbolB: 54
- 5
- rain: 0.3
- temp: 19
- symbol_value: 5
- snowline: 3700
- symbol_description: Sunny intervals with light rain shower
- symbol_description2: Sunny intervals with light rain shower
- pressure: 1013
- clouds: 44%
- uv_index: 2
- symbol_value2: 5
- humidity: 69
- interval: 16:00
- windchill: 19
- wind
- symbol: 15
- gusts: 42
- dir: W
- speed: 18
- symbolB: 55
- 6
- rain: 0
- temp: 17
- symbol_value: 3
- snowline: 3500
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1014
- clouds: 61%
- uv_index: 0
- symbol_value2: 3
- humidity: 78
- interval: 19:00
- windchill: 17
- wind
- symbol: 14
- gusts: 33
- dir: SW
- speed: 17
- symbolB: 46
- 7
- rain: 0
- temp: 16
- symbol_value: 3
- snowline: 3600
- symbol_description: Cloudy
- symbol_description2: Cloudy
- pressure: 1016
- clouds: 91%
- uv_index: 0
- symbol_value2: 3
- humidity: 86
- interval: 22:00
- windchill: 16
- wind
- symbol: 14
- gusts: 32
- dir: SW
- speed: 16
- symbolB: 46
- 0
- name: Thursday
- symbol_value2: 6
- humidity: 80
- tempmin: 16
- wind
- symbol: 14
- gusts: 44
- speed: 22
- symbolB: 54
- 1
- url: https://www.yourweather.co.uk/weather_Rhyl-Europe-United+Kingdom-Denbighshire--1-34671.html
- status: 0
but if I try a For I = 1 to 5 I can't read the last day entry, and if I manually Map to 5 I get the same error,
i.e.
B4X:
Dim i As Int
i = 5
Dim strI As String = i
Dim d1 As Map = day.Get(strI)
date(i) = d1.Get("date")
description(i) = d1.Get("symbol_description")
rain(i) = d1.Get("rain")
''''''' etc
Why ?
error
main$ResumableSub_Downloadresume (java line: 859)
java.lang.ArrayIndexOutOfBoundsException: length=5; index=5
And it's the same when trying to get the data from Hour 0 to 7, if I do a For y = 0 to 6 it's okay but try For y = 0 to 7 and I get a similar error
Last edited: