• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Accuweather json - parse error

sonic18

Lurker
Hello,

This is my first time using json in android, the json is getting downloaded,
i'm just getting an parse error

I understand the concept of json's arrays, objects, keys & values

If you wish to learn more, I would recommend
https://www.tutorialspoint.com/android/android_json_parser.htm


I added a JSON example below


This is my parsing code :


Code:
protected JSONObject doInBackground(Pair<String, String>[] pairs) {

        HttpHandler sh = new HttpHandler();
        // Making a request to url and getting response
        String url = "http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/83342?apikey=HDJ7qKj9ZH0XEW41vgj507CVox7GrRE8&language=en-us&details=true&metric=true";
        String jsonStr = sh.makeServiceCall(url);
        System.out.println("Response from url: " + jsonStr);

        if (jsonStr != null) {
            try {

                JSONObject jsonObj = new JSONObject(jsonStr);
                // Getting JSON Array node

                JSONArray getAccuweather = jsonObj.getJSONArray("weather");

                // looping through All Contacts
                for (int i = 0; i < getAccuweather.length(); i++) {
                    JSONObject getInfo = getAccuweather.getJSONObject(i);
                    String DateTimeArray = getInfo.getString("DateTime");

                    String EpochDateTimeArray = getInfo.getString("EpochDateTime");
                    String WeatherIconArray = getInfo.getString("WeatherIcon");
                    String IconPhraseArray = getInfo.getString("IconPhrase");
                    String IsDaylighteArray = getInfo.getString("IsDaylight");
                    String TemperatureeArray = getInfo.getString("Temperature");


                    String RealFeelTemperatureArray = getInfo.getString("RealFeelTemperature");
                    String WetBulbTemperatureArray = getInfo.getString("WetBulbTemperature");
                    String DewPointArray = getInfo.getString("DewPoint");
                    String WindArray = getInfo.getString("Wind");
                    String DirectionArray = getInfo.getString("Direction");
                    String WindGustArray = getInfo.getString("WindGust");
                    String RelativeHumidityArray = getInfo.getString("RelativeHumidity");
                    String CeilingArray = getInfo.getString("Ceiling");
                    String UVIndexArray = getInfo.getString("UVIndex");
                    String UVIndexTextArray = getInfo.getString("UVIndexText");
                    String PrecipitationProbabilityArray = getInfo.getString("PrecipitationProbability");
                    String RainProbabilityArray = getInfo.getString("RainProbability");
                    String SnowProbabilityArray = getInfo.getString("SnowProbability");
                    String IceProbabilityArray = getInfo.getString("IceProbability");
                    String TotalLiquidArray = getInfo.getString("TotalLiquid");
                    String RainArray = getInfo.getString("Rain");
                    String SnowArray = getInfo.getString("Snow");
                    String IceArray = getInfo.getString("Ice");
                    String CloudCoverArray = getInfo.getString("CloudCover");
                    String MobileLinkArray = getInfo.getString("MobileLink");
                    String Link = getInfo.getString("Link");

                    //  JSON Object (Date & Time Object)
                    JSONObject DateTimeObject = getInfo.getJSONObject("DateTime");
                    String DateTime = DateTimeObject.getString("DateTime");

                    //  JSON Object (EpochDateTimeO bject)
                    JSONObject EpochDateObject = getInfo.getJSONObject("EpochDateTime");
                    int EpochDate = EpochDateObject.getInt("EpochDateTime");

                    //  JSON Object (WeatherIcon Object)
                    JSONObject WeatherIconObject = getInfo.getJSONObject("WeatherIcon");
                    int WeatherIcon = WeatherIconObject.getInt("WeatherIcon");

                    //  JSON Object (IconPhrase Object)
                    JSONObject IconPhraseObject = getInfo.getJSONObject("IconPhrase");
                    String IconPhrase = IconPhraseObject.getString("IconPhrase");

                    //  JSON Object (IsDaylight Object)
                    JSONObject IsDaylightObject = getInfo.getJSONObject("IsDaylight");
                    boolean IsDaylight = IsDaylightObject.getBoolean("IsDaylight");


                    //  JSON Object (Temperature Object)
                    JSONObject DateTimeObject_Temperature = DateTimeObject.getJSONObject("Temperature");
                    int DateTimeValue = DateTimeObject_Temperature.getInt("Value");
                    String Unit = DateTimeObject_Temperature.getString("Unit");
                    int UnitType = DateTimeObject_Temperature.getInt("UnitType");

                    // JSON Object (RealFeelTemperature Object)
                    JSONObject RealFeelTemperatureObject = getInfo.getJSONObject("RealFeelTemperature");
                    int RealFeelTemperatureValue = RealFeelTemperatureObject.getInt("Value");
                    String RealFeelTemperatureUnit = RealFeelTemperatureObject.getString("Unit");
                    int RealFeelTemperatureUnitType = RealFeelTemperatureObject.getInt("UnitType");

                    // JSON Object (WetBulbTemperature Object)
                    JSONObject WetBulbTemperatureObject = getInfo.getJSONObject("WetBulbTemperature");
                    int WetBulbTemperatureValue = WetBulbTemperatureObject.getInt("Value");
                    String WetBulbTemperatureeUnit = WetBulbTemperatureObject.getString("Unit");
                    int WetBulbTemperatureType = WetBulbTemperatureObject.getInt("UnitType");

                    // JSON Object (DewPoint Object)
                    JSONObject DewPointObject = getInfo.getJSONObject("DewPoint");
                    int DewPointValue = DewPointObject.getInt("Value");
                    String DewPointUnit = DewPointObject.getString("Unit");
                    int DewPointUnitType = DewPointObject.getInt("UnitType");

                    // JSON Object (Wind Object)
                    JSONObject WindObject = getInfo.getJSONObject("Wind");
                    JSONObject WindObject_Wind = WindObject.getJSONObject("Speed");
                    int WindValue = WindObject_Wind.getInt("Value");
                    String WindUnit = WindObject_Wind.getString("Unit");
                    int WindUnitType = WindObject_Wind.getInt("UnitType");

                    JSONObject WindObject_Direction = getInfo.getJSONObject("Direction");
                    int Wind_Direction_Degrees = WindObject_Direction.getInt("Degrees");
                    String Wind_Direction_Localized = WindObject_Direction.getString("Localized");
                    String Wind_Direction_English = WindObject_Direction.getString("English");

                    // JSON Object (WindGust Object)
                    JSONObject WindGustObject = getInfo.getJSONObject("WindGust");
                    JSONObject WindGustObject_WindGuest = WindGustObject.getJSONObject("Speed");
                    int WindGuestValue = WindGustObject_WindGuest.getInt("Value");
                    String WindGuestUnit = WindGustObject_WindGuest.getString("Unit");
                    int WindGuestUnitType = WindGustObject_WindGuest.getInt("UnitType");


                    // JSON Object (RelativeHumidity Object)
                    JSONObject RelativeHumidityObject = getInfo.getJSONObject("RelativeHumidity");
                    int RelativeHumidityUnit = RelativeHumidityObject.getInt("RelativeHumidity");

                    JSONObject VisibilityObject = RelativeHumidityObject.getJSONObject("Visibility");
                    int Visibiliyt_value = VisibilityObject.getInt("Value");
                    String Visibility_Unit = VisibilityObject.getString("Unit");
                    int Visibility_UnitType = VisibilityObject.getInt("UnitType");


                    // JSON Object (Ceiling Object)
                    JSONObject CeilingObject = getInfo.getJSONObject("Visibility");
                    int Ceiling_value = CeilingObject.getInt("Value");
                    String Ceiling_Unit = CeilingObject.getString("Unit");
                    int Ceiling_UnitType = CeilingObject.getInt("UnitType");

                    // JSON Object (UVIndex Object)
                    JSONObject UVIndexObject = getInfo.getJSONObject("UVIndex");
                    String UVIndex = UVIndexObject.getString("UVIndex");

                    // JSON Object (PrecipitationProbability Object)
                    JSONObject PrecipitationProbabilityObject = getInfo.getJSONObject("PrecipitationProbability");
                    int PrecipitationProbability = PrecipitationProbabilityObject.getInt("PrecipitationProbability");

                    // JSON Object (UVIndexText Object)
                    JSONObject UVIndexTextObject = getInfo.getJSONObject("UVIndexText");
                    int UVIndexText = UVIndexTextObject.getInt("UVIndexText");

                    // JSON Object (SnowProbability Object)
                    JSONObject SnowProbabilityObject = getInfo.getJSONObject("SnowProbability");
                    int SnowProbability = SnowProbabilityObject.getInt("SnowProbability");

                    // JSON Object (IceProbability Object)
                    JSONObject IceProbabilityObject = getInfo.getJSONObject("IceProbability");
                    int IceProbability = IceProbabilityObject.getInt("IceProbability");


                    // JSON Object (TotalLiquid Object)
                    JSONObject TotalLiquidObject = getInfo.getJSONObject("TotalLiquid");
                    int TotalLiquidValue = TotalLiquidObject.getInt("Value");
                    String TotalLiquidUnit = TotalLiquidObject.getString("Unit");
                    int TotalLiquidUnitType = TotalLiquidObject.getInt("UnitType");

                    // JSON Object (Rain Object)
                    JSONObject RainObject = getInfo.getJSONObject("Rain");
                    int RainValue = RainObject.getInt("Value");
                    String RainUnit = RainObject.getString("Unit");
                    int RainUnitType = RainObject.getInt("UnitType");

                    // JSON Object (Snow Object)
                    JSONObject SnowObject = getInfo.getJSONObject("Snow");
                    int SnowValue = SnowObject.getInt("Value");
                    String SnowUnit = SnowObject.getString("Unit");
                    int SnowUnitType = SnowObject.getInt("UnitType");

                    // JSON Object (Ice Object)
                    JSONObject IceObject = getInfo.getJSONObject("Ice");
                    int IceValue = IceObject.getInt("Value");
                    String IceUnit = IceObject.getString("Unit");
                    int IceUnitType = IceObject.getInt("UnitType");

                    // JSON Object (MobileLink Object)
                    JSONObject MobileLinkObject = getInfo.getJSONObject("MobileLink");
                    String MobileLink = MobileLinkObject.getString("MobileLink");

                    // JSON Object (Link Object)
                    JSONObject LinkObject = getInfo.getJSONObject("Link");
                    String Link_value = LinkObject.getString("Link");

                    System.out.println("Some of the outputs : " + Visibiliyt_value +"\n" + Visibility_Unit +"\n" + DateTimeValue ) ;

                }

                }catch (final JSONException e) {
                Log.e(TAG, "Json parsing error: " + e.getMessage());

                new Thread(new Runnable() {
                    public void run() {

                        System.out.println("Json parsing error: " + e.getMessage());
                    }
                }).start();
            }
            }else {
            System.out.print("Couldn't get json from server.");

            new Thread(new Runnable() {
                public void run() {

                    System.out.println("Couldn't get json from server. Check LogCat for possible errors!");
                }
            }).start();
        }


            return null;

    }


*JSON example:*
Code:
    [
      {
        "DateTime": "2017-11-29T21:00:00+08:00",
        "EpochDateTime": 1511960400,
        "WeatherIcon": 35,
        "IconPhrase": "Partly cloudy",
        "IsDaylight": false,
        "Temperature": {
          "Value": -5.8,
          "Unit": "C",
          "UnitType": 17
        },
        "RealFeelTemperature": {
          "Value": -6.7,
          "Unit": "C",
          "UnitType": 17
        },
        "WetBulbTemperature": {
          "Value": -7.4,
          "Unit": "C",
          "UnitType": 17
        },
        "DewPoint": {
          "Value": -12,
          "Unit": "C",
          "UnitType": 17
        },
        "Wind": {
          "Speed": {
            "Value": 7.4,
            "Unit": "km/h",
            "UnitType": 7
          },
          "Direction": {
            "Degrees": 353,
            "Localized": "N",
            "English": "N"
          }
        },
        "WindGust": {
          "Speed": {
            "Value": 11.1,
            "Unit": "km/h",
            "UnitType": 7
          }
        },
        "RelativeHumidity": 62,
        "Visibility": {
          "Value": 16.1,
          "Unit": "km",
          "UnitType": 6
        },
        "Ceiling": {
          "Value": 9144,
          "Unit": "m",
          "UnitType": 5
        },
        "UVIndex": 0,
        "UVIndexText": "Low",
        "PrecipitationProbability": 0,
        "RainProbability": 0,
        "SnowProbability": 0,
        "IceProbability": 0,
        "TotalLiquid": {
          "Value": 0,
          "Unit": "mm",
          "UnitType": 3
        },
        "Rain": {
          "Value": 0,
          "Unit": "mm",
          "UnitType": 3
        },
        "Snow": {
          "Value": 0,
          "Unit": "cm",
          "UnitType": 4
        },
        "Ice": {
          "Value": 0,
          "Unit": "mm",
          "UnitType": 3
        },
        "CloudCover": 30,
        "MobileLink": "http://m.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=1&unit=c&lang=en-us",
        "Link": "http://www.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=1&hbhhour=21&unit=c&lang=en-us"
      },
    ]

Would love to know what my mistake, been looking at it for a while now
 
The catlog is giving me :

Code:
11-30 15:05:11.208 3887-3902/glaien.sonweather I/System.out: Response from url: [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13.0,"Unit":"km/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144.0,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0.0,"Unit":"mm","UnitType":3},"Rain":{"Value":0.0,"Unit":"mm","UnitType":3},"Snow":{"Value":0.0,"Unit":"cm","UnitType":4},"Ice":{"Value":0.0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http://m.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=1&unit=c&lang=en-us","Link":"http://www.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13.0,"Unit":"km/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144.0,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0.0,"Unit":"mm","UnitType":3},"Rain":{"Value":0.0,"Unit":"mm","UnitType":3},"Snow":{"Value":0.0,"Unit":"cm","UnitType":4},"Ice":{"Value":0.0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http://m.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=2&unit=c&lang=en-us","Link":"http://www.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144.0,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0.0,"Unit":"mm","UnitType":3},"Rain":{"Value":0.0,"Unit":"mm","UnitType":3},"Snow":{"Value":0.0,"Unit":"cm","UnitType":4},"Ice":{"Value":0.0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http://m.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=2&unit=c&lang=en-us","Link":"http://www.accuweather.com/en/cn/matouying-town/83987/hourly-weather-forecast/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.6,"
11-30 15:05:11.212 3887-3902/glaien.jsonweather E/MainActivity: Json parsing error: Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17
11-30 15:05:11.213 3887-3907/glaien.jsonweather I/System.out: Json parsing error: Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},
 
Some vital diagnostic information hasn't been shown. Replace your catch statement with this

Code:
catch (JSONException e) {
         throw new RuntimeException(e);
     }

And observe what is shown in the Logcat view. There should be a full stack trace which reveals more information about the parse error.
 
Wow! I never knew that, Thanks! :D So much more details came up

Code:
--------- beginning of crash
11-30 15:40:58.201 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: FATAL EXCEPTION: Thread-2
                                                                        Process: glaien.sonic.jsonweather, PID: 4210
11-30 15:40:58.201 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: java.lang.RuntimeException: org.json.JSONException: Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType
11-30 15:40:58.201 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: ":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.6,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":298,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":36,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=2&unit=c&lang=en-us"},{"DateTime":"2017-12-01T03:00:00+08:00","EpochDateTime":1512068400,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-6.2,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-17.2,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":299,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":42,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=3&unit=c&lang=en-us"},{"DateTime":"2017-12-01T04:00:00+08:00","EpochDateTime":1512072000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9,"Unit":"C","UnitType":17},"DewPoint":{"Value":-16,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":296,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":49,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=4&unit=c&lang=en-us"},{"DateTime":"2017-12-01T05:00:00+08:00","EpochDateTime":1512075600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-7.3,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"DewPoint":{"Value":-14.8,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":292,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","U
11-30 15:40:58.201 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: nitType":7}},"RelativeHumidity":56,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=5&unit=c&lang=en-us"},{"DateTime":"2017-12-01T06:00:00+08:00","EpochDateTime":1512079200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-8.1,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.4,"Unit":"C","UnitType":17},"DewPoint":{"Value":-13.7,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":290,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":64,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=6&unit=c&lang=en-us"},{"DateTime":"2017-12-01T07:00:00+08:00","EpochDateTime":1512082800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-9.5,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-11.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-10.2,"Unit":"C","UnitType":17},"DewPoint":{"Value":-12.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":7.4,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":288,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":77,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=7&unit=c&lang=en-us"},{"DateTime":"2017-12-01T08:00:00+08:00","EpochDateTime":1512086400,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-8.1,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.2,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.2,"Unit":"C","UnitType":17},"DewPoint":{"Value":-12.8,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":285,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":70,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":1,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"m
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: m","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=8&unit=c&lang=en-us"},{"DateTime":"2017-12-01T09:00:00+08:00","EpochDateTime":1512090000,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-4.5,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-4.9,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-6.8,"Unit":"C","UnitType":17},"DewPoint":{"Value":-13.5,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":281,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":50,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":1,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=9&unit=c&lang=en-us"},{"DateTime":"2017-12-01T10:00:00+08:00","EpochDateTime":1512093600,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-0.9,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-4.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-15.1,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":2,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=10&unit=c&lang=en-us"}] of type org.json.JSONArray cannot be converted to JSONObject
                                                                            at glaien.sonic.jsonweather.JSON$1.run(JSON.java:242)
                                                                            at java.lang.Thread.run(Thread.java:761)
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: Caused by: org.json.JSONException: Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTem
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: perature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.6,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":298,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":36,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=2&unit=c&lang=en-us"},{"DateTime":"2017-12-01T03:00:00+08:00","EpochDateTime":1512068400,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-6.2,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-17.2,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":299,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":42,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=3&unit=c&lang=en-us"},{"DateTime":"2017-12-01T04:00:00+08:00","EpochDateTime":1512072000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9,"Unit":"C","UnitType":17},"DewPoint":{"Value":-16,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":296,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":49,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=4&unit=c&lang=en-us"},{"DateTime":"2017-12-01T05:00:00+08:00","EpochDateTime":1512075600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-7.3,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"DewPoint":{"Value":-14.8,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":292,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"Rel
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: ativeHumidity":56,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=5&unit=c&lang=en-us"},{"DateTime":"2017-12-01T06:00:00+08:00","EpochDateTime":1512079200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-8.1,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-10.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.4,"Unit":"C","UnitType":17},"DewPoint":{"Value":-13.7,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":290,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":64,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=6&unit=c&lang=en-us"},{"DateTime":"2017-12-01T07:00:00+08:00","EpochDateTime":1512082800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-9.5,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-11.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-10.2,"Unit":"C","UnitType":17},"DewPoint":{"Value":-12.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":7.4,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":288,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":77,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=7&unit=c&lang=en-us"},{"DateTime":"2017-12-01T08:00:00+08:00","EpochDateTime":1512086400,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-8.1,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.2,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-9.2,"Unit":"C","UnitType":17},"DewPoint":{"Value":-12.8,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":285,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":70,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":1,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather E/AndroidRuntime: "Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=8&unit=c&lang=en-us"},{"DateTime":"2017-12-01T09:00:00+08:00","EpochDateTime":1512090000,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-4.5,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-4.9,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-6.8,"Unit":"C","UnitType":17},"DewPoint":{"Value":-13.5,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":281,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":50,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":1,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=9&unit=c&lang=en-us"},{"DateTime":"2017-12-01T10:00:00+08:00","EpochDateTime":1512093600,"WeatherIcon":1,"IconPhrase":"Sunny","IsDaylight":true,"Temperature":{"Value":-0.9,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-4.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-15.1,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":2,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=10&unit=c&lang=en-us"}] of type org.json.JSONArray cannot be converted to JSONObject
                                                                            at org.json.JSON.typeMismatch(JSON.java:111)
                                                                            at org.json.JSONObject.<init>(JSONObject.java:160)
                                                                            at org.json.JSONObject.<init>(JSONObject.java:173)
                                                                            at glaien.sonic.jsonweather.JSON.doInBackground(JSON.java:58)
                                                                            at glaien.sonic.jsonweather.JSON.doInBackground(JSON.java:31)
                                                                            at android.os.AsyncTask$2.call(AsyncTask.java:305)
                                                                            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                ... 1 more
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather D/Error: ERR: exClass=org.json.JSONException
11-30 15:40:58.202 4210-4259/glaien.sonic.jsonweather D/Error: ERR: exMsg=Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"V
11-30 15:40:58.203 4210-4259/glaien.sonic.jsonweather D/Error: ERR: file=JSON.java
11-30 15:40:58.203 4210-4259/glaien.sonic.jsonweather D/Error: ERR: class=org.json.JSON
11-30 15:40:58.203 4210-4259/glaien.sonic.jsonweather D/Error: ERR: method=typeMismatch line=111
11-30 15:40:58.203 4210-4259/glaien.sonic.jsonweather D/Error: ERR: stack=java.lang.RuntimeException: org.json.JSONException: Value [{"DateTime":"2017-11-30T23:00:00+08:00","EpochDateTime":1512054000,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.8,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.4,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"DewPoint":{"Value":-19.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":9.3,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":278,"Localized":"W","English":"W"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":34,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=1&hbhhour=23&unit=c&lang=en-us"},{"DateTime":"2017-12-01T00:00:00+08:00","EpochDateTime":1512057600,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-8.7,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.9,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":286,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":13,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":35,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=0&unit=c&lang=en-us"},{"DateTime":"2017-12-01T01:00:00+08:00","EpochDateTime":1512061200,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"Value":-8.5,"Unit":"C","UnitType":17},"DewPoint":{"Value":-18.3,"Unit":"C","UnitType":17},"Wind":{"Speed":{"Value":11.1,"Unit":"km\/h","UnitType":7},"Direction":{"Degrees":293,"Localized":"WNW","English":"WNW"}},"WindGust":{"Speed":{"Value":14.8,"Unit":"km\/h","UnitType":7}},"RelativeHumidity":37,"Visibility":{"Value":16.1,"Unit":"km","UnitType":6},"Ceiling":{"Value":9144,"Unit":"m","UnitType":5},"UVIndex":0,"UVIndexText":"Low","PrecipitationProbability":0,"RainProbability":0,"SnowProbability":0,"IceProbability":0,"TotalLiquid":{"Value":0,"Unit":"mm","UnitType":3},"Rain":{"Value":0,"Unit":"mm","UnitType":3},"Snow":{"Value":0,"Unit":"cm","UnitType":4},"Ice":{"Value":0,"Unit":"mm","UnitType":3},"CloudCover":0,"MobileLink":"http:\/\/m.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&unit=c&lang=en-us","Link":"http:\/\/www.accuweather.com\/en\/cn\/matouying-town\/83987\/hourly-weather-forecast\/83987?day=2&hbhhour=1&unit=c&lang=en-us"},{"DateTime":"2017-12-01T02:00:00+08:00","EpochDateTime":1512064800,"WeatherIcon":33,"IconPhrase":"Clear","IsDaylight":false,"Temperature":{"Value":-5.7,"Unit":"C","UnitType":17},"RealFeelTemperature":{"Value":-9.1,"Unit":"C","UnitType":17},"WetBulbTemperature":{"
11-30 15:40:58.203 4210-4259/glaien.sonic.jsonweather D/Error: ERR: TOTAL BYTES WRITTEN: 71104
11-30 15:40:58.572 4210-4247/glaien.sonic.jsonweather D/EGL_emulation: eglMakeCurrent: 0x9d204ec0: ver 3 1 (tinfo 0x9bfe5b80)

from what I can see there is a runtime & json error

I then found a typeMismatch on one of the objects (IconPhrase, line 111), i doubled checked that it wasn't a typo & that the input is a string, not a int, boolean, etc. i also double checked the order of the objects, everything looks like it is in order

Code:
                    //  JSON Object (IconPhrase Object)
                    JSONObject IconPhraseObject = getInfo.getJSONObject("IconPhrase");
                    String IconPhrase = IconPhraseObject.getString("IconPhrase");
 
still trying to figure this out, any suggestions? :)

There is also a reference to the IconPrase response parameter by Accuweather api web-site

IconPhrase : string : Phrase description of the forecast associated with the WeatherIcon. Displayed in language specified by language code in URL.
 
Last edited:
still trying to figure this out, any suggestions? :)

Yes. You have a lot of code in your try block. The way to systematically investigate this problem is to run your app in debug mode. Set a breakpoint at this line of code

Code:
JSONObject jsonObj = new JSONObject(jsonStr);

And single step through the code until you get to the line which throws the exception. Then you will have pinpointed the exact place in your code which is causing the problem.
 
Although looking at your stack trace reveals more information

Code:
at org.json.JSON.typeMismatch(JSON.java:111)
                                                                            at org.json.JSONObject.<init>(JSONObject.java:160)
                                                                            at org.json.JSONObject.<init>(JSONObject.java:173)
                                                                            at glaien.sonic.jsonweather.JSON.doInBackground(JSON.java:58)

The problem seems to be happening at the point where you create a new JSON object - <int> means the constructor of that object.
So, at this line

Code:
JSONObject jsonObj = new JSONObject(jsonStr);

Which indicates to me that there's an error in the JSON that your app received.
 
And just another follow up to this - you know that if you debug your code, as I explained above, you can even step into the code of the framework libraries, including the JSON parser. That will really help you figure out what's going on. This is the beauty of open source, you get to see all the code.
 
Back
Top Bottom