Page 1 of 1

[Answered] [573] Plugin crash (kio.json:337)

Posted: 24 Dec 2018, 14:25
by Artem_123
Hi, I got the following error with a plugin (kio.json:337):

Code: Select all

In /data/data/info.flowersoft.theotown.theotown/files/plugins/plg_kio.zip/kio/kio.json:

org.json.JSONException: Unterminated object at character 236 of [
   {
      "id":"kio.png",
	  "type":"commercial",
     "category":"Gahq_category",
      "width": 1,
	  "height": 1,
      "level": 2,
      "workers":6,
      "zone":" Gahqzone",
	  "frames":[{"bmp":"kio.png"}],
	  "water":"1,
	  "power":"1,
      "build time": 3,
	  "title":"Gahq shop
	  "text":"Good luck!"
   }
]
Device: GT-I9060 (samsung)
Android: 17 (4.2.2)

Thank you in advance.

Re: [573] Plugin crash (kio.json:337)

Posted: 24 Dec 2018, 15:20
by Lobby
I recommend to use this website to spot json syntax errors in your code: https://jsonlint.com/

Re: [573] Plugin crash (kio.json:337)

Posted: 24 Dec 2018, 18:58
by CommanderABab
Artem_123 wrote:
24 Dec 2018, 14:25
Hi, I got the following error with a plugin (kio.json:337):

Code: Select all

In /data/data/info.flowersoft.theotown.theotown/files/plugins/plg_kio.zip/kio/kio.json:

org.json.JSONException: Unterminated object at character 236 of [
   {
      "id":"kio.png",
	  "type":"commercial",
     "category":"Gahq_category",
      "width": 1,
	  "height": 1,
      "level": 2,
      "workers":6,
      "zone":" Gahqzone",
	  "frames":[{"bmp":"kio.png"}],
	  "water":"1,
	  "power":"1,
      "build time": 3,
	  "title":"Gahq shop
	  "text":"Good luck!"
   }
]
Device: GT-I9060 (samsung)
Android: 17 (4.2.2)

Thank you in advance.
As Lobby said. Also #codeboxtip .

I see problems these three lines:
1 numbers don't take quotes.  2 missing  quote and comma in title line.
1 numbers don't take quotes. 2 missing quote and comma in title line.