Caused by: java.lang.NumberFormatException: Invalid double: “” with blank value

后端 未结 2 963
囚心锁ツ
囚心锁ツ 2021-01-28 02:59

I get ther error when JSON string have some blank value, getting from server, how to deal with blank values here is JSON

{  
   \"status\":\"succes         


        
2条回答
  •  再見小時候
    2021-01-28 03:24

    public int image_width;     // Expected integer value while parsing 
    
    public int image_height;   // Expected integer value while parsing
    

    as you can see below you are having string fields . Initialize below vale to 0

    "image_width":0,
    "image_height":0
    

提交回复
热议问题