Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/188.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 字符处的JSON未终止对象_Java_Android_Json - Fatal编程技术网

Java 字符处的JSON未终止对象

Java 字符处的JSON未终止对象,java,android,json,Java,Android,Json,我想从互联网上读取json,现在我可以从互联网上读取到字符串,但我可能犯了一个在json中找不到的错误: { "S4ROMS" :[ { "name":"Cyanogenmod 13", "android":"6.0.1", "status":"nightly", "description":"If you like android, you probably can't wait till your phone

我想从互联网上读取json,现在我可以从互联网上读取到字符串,但我可能犯了一个在json中找不到的错误:

{
     "S4ROMS" :[
     {
        "name":"Cyanogenmod 13",
        "android":"6.0.1",
        "status":"nightly",
        "description":"If you like android, you probably can't wait till your phone gets updates but cyanogenmod 13 brings you not just original android 6.0.1, it comes with root access, option to apply themes, option to switch from hardware to on screen buttons, the rest you will know when you install it.",
        "tested":true,
        "website":"https://download.cyanogenmod.org/?device=jfltexx",
        "image":"http://images.technewstoday.com.s3.amazonaws.com/tnt/how-to-install-android-marshmallow-samsung-galaxy-s4-using-cm13-rom.jpg",
        "gapps":true
     },
     {
        "name":"S4 Google Edition",
        "android":"4.4.4",
        "status":"stable",
        "description":"Feel the experience of Nexus - this tells you everything.",
        "tested":false,
        "website":"http://forum.xda-developers.com/showthread.php?t=2544474",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":false
     },
     {
        "name":"PhoeniX ROM v11.6",
        "android":"5.0.x",
        "status":"stable"
        "description":"Stock 5.0 Samsung Galaxy S4 touchwiz rom with some mods, hacks and addons.",
        "tested":true,
        "website":"http://forum.xda-developers.com/showthread.php?t=2349584",
        "gapps":false
     },
     {
        "name":"Miui 7",
        "android":"4.4.x",
        "status":"stable with some bugs",
        "description":"Chinese rom based on Samsung Galaxy S4 with brand new UI looking like Iphone.",
        "tested":false,
        "website":"http://forum.xda-developers.com/galaxy-s4/i9505-develop/4-4-miui-7-t3184430",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":false
     },
     {
        "name":"AOKP",
        "android":"4.4.x",
        "status":"stable"
        "description":"AOSP based rom with some tweaks.",
        "tested":true,
        "website":"http://aokp.co/devices/jflte",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":true
     },
     {
        "name":"SOKP",
        "android":"4.4.x",
        "status":"stable",
        "description":"Cyanogen Mod 11.0 based rom with some tweaks.",
        "tested":false,
        "website":"http://forum.xda-developers.com/showthread.php?t=2724109",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":true
     },
     {
        "name":"XenonHD",
        "android":"4.4.2",
        "status":"alpha 1",
        "description":"The idea behind XenonHD is to give users a ROM that is 'blazing fast, rock stable and battery smooth'. The ROM is based on AOSP.",
        "tested":false,
        "website":"http://forum.xda-developers.com/showthread.php?t=2737839",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":true
     },
     {
        "name":"SlimSaberKat",
        "android":"4.4.4",
        "status":"stable",
        "description":"The ROM is based on SlimKat (AOSP).",
        "tested":false,
        "website":"http://forum.xda-developers.com/showthread.php?t=2760650",
        "image":"http://abload.de/img/1qzo3r.png",
        "gapps":true
     }
     ] 
  }
javaandroid代码从internet读取它,如果我删除除前两个jsonarray之外的所有内容,它也会读取它并给出预期的输出,但是当我使用所有json代码时,它会给出我的这个异常

org.json.JSONException: Unterminated object at character 1098 of {         "S4ROMS" :[         {            "name":"Cyanogenmod 13",            "android":"6.0.1",          "status":"nightly",         "description":"If you like android, you probably can't wait till your phone gets updates but cyanogenmod 13 brings you not just original android 6.0.1, it comes with root access, option to apply themes, option to switch from hardware to on screen buttons, the rest you will know when you install it.",           "tested":true,          "website":"https://download.cyanogenmod.org/?device=jfltexx",           "image":"http://images.technewstoday.com.s3.amazonaws.com/tnt/how-to-install-android-marshmallow-samsung-galaxy-s4-using-cm13-rom.jpg",         "gapps":true         },      {            "name":"S4 Google Edition",            "android":"4.4.4",         "status":"stable",          "description":"Feel the experience of Nexus - this tells you everything.",          "tested":false,         "website":"http://forum.xda-developers.com/showthread.php?t=2544474",           "image":"http://abload.de/img/1qzo3r.png",          "gapps":false         },         {            "name":"PhoeniX ROM v11.6",            "android":"5.0.x",         "status":"stable"           "description":"Stock 5.0 Samsung Galaxy S4 touchwiz rom with some mods, hacks and addons.",         "tested":true,          "website":"http://forum.xda-developers.com/showthread.php?t=2349584",           "gapps":false         },         {            "name":"Miui 7",            "android":"4.4.x",            "status":"stable with some bugs",           "description":"Chinese rom based on Samsung Galaxy S4 with brand new UI looking like Iphone.",          "tested":false,         "website":"http://forum.xda-developers.com/galaxy-s4/i9505-develop/4-4-miui-7-t3184430",            "image":"http://abload.de/img/1qzo3r.png",          "gapps":false         },         {            "name":"AOKP",            "android":"4.4.x",          "status":"stable"           "description":"AOSP based rom with some tweaks.",           "tested":true,          "website":"http://aokp.co/devices/jflte",           "image":"http://abload.de/img/1qzo3r.png",          "gapps":true         },      {            "name":"SOKP",            "android":"4.4.x",          "status":"stable",          "description":"Cyanogen Mod 11.0 based rom with some tweaks.",          "tested":false,         "website":"http://forum.xda-developers.com/showthread.php?t=2724109",           "image":"http://abload.de/img/1qzo3r.png",          "gapps":true         },      {            "name":"XenonHD",            "android":"4.4.2",           "status":"alpha 1",         "description":"The idea behind XenonHD is to give users a ROM that is 'blazing fast, rock stable and battery smooth'. The ROM is based on AOSP.",           "tested":false,         "website":"http://forum.xda-developers.com/showthread.php?t=2737839",           "image":"http://abload.de/img/1qzo3r.png",          "gapps":true         },      {            "name":"SlimSaberKat",            "android":"4.4.4",          "status":"stable",          "description":"The ROM is based on SlimKat (AOSP).",            "tested":false,         "website":"http://forum.xda-developers.com/showthread.php?t=2760650",           "image":"http://abload.de/img/1qzo3r.png",          "gapps":true         }         ]       }

PhoeniX ROM v11.6
的块中,在
状态
之后缺少逗号
PhoeniX ROM v11.6
的块中,在
状态
之后缺少逗号问题是json对象值包含“稳定的”“描述”之类的引号:“库存5.0三星Galaxy S4 touchwiz rom,带有一些MOD、黑客和插件。”,“测试”:真,“网站”:“gapps”:假

将其粘贴到json解析器/validitor中会显示错误

问题在于,json对象值包含诸如“稳定”“说明”:“库存5.0三星Galaxy S4 touchwiz rom,带有一些MOD、黑客和插件”,“测试”:真,“网站”:“gapps”:假等引号

将其粘贴到json解析器/validitor中会显示错误

以下图片显示了代码中错误的原因


此处缺少逗号…

以下图片显示了代码中错误的原因


此处缺少逗号…

在某些
状态
字段后缺少逗号,也可以使用联机json验证程序这样的联机json验证程序:在某些
状态
字段后缺少逗号,也可以使用联机json验证程序这样的联机json验证程序: