## JSONarray cannot be converted to JSONObject

Do you have any issues? Don't hesitate to tell us about it.
PixelBit1702
Villager
Reactions:
Posts: 22
Joined: Mon Dec 09, 2019 18:09
Location: Paraná, Brazil.
Plugins: Show

### JSONarray cannot be converted to JSONObject

Hello, I am a new user here and I would like to ask if someone could help me with a problem I am having when I upload my plugins. I have deleted my recent plugin because of this message:

io.blueflower.stapdel2.util.json.JSONExpection: Value [{"id":"$pcw_JC4klQWxl800", "height":4, "width":4, "frames" [{"bmp":"d creator website 0.5 & PixelBit1702}] at 0 of type io.blueflower.stapdel2.util.json.JSONarray cannot be converted to JSONObject I don't know what to do. Last edited by PixelBit1702 on Mon Feb 03, 2020 4:23, edited 1 time in total. Ølsken Former Bearbear65 Reactions: Posts: 4971 Joined: Fri Feb 10, 2017 14:53 Plugins: Show Version: Beta Phone model: Samsung S10 #### Platform #### Plugin Creator ### Re: JSONarray cannot be converted to JSONObject the "frames" look odd You have to put a picture there such as example.png and also have to add a " to the end Code: Select all "frames":[{"bmp":"example.png"}], Just my opinion PixelBit1702 Villager Reactions: Posts: 22 Joined: Mon Dec 09, 2019 18:09 Location: Paraná, Brazil. Plugins: Show ### Re: JSONarray cannot be converted to JSONObject Well, in the frames I added the picture of my plugin, but still not working. CommanderABab AB Reactions: Posts: 8140 Joined: Tue Jun 07, 2016 21:12 Plugins: Show Version: Beta #### Platform #### Plugin Creator ### Re: JSONarray cannot be converted to JSONObject Why not quote this, copy your code and paste it --> Code: Select all here ps890giv psdl8bzi< PixelBit1702 Villager Reactions: Posts: 22 Joined: Mon Dec 09, 2019 18:09 Location: Paraná, Brazil. Plugins: Show ### Re: JSONarray cannot be converted to JSONObject Ok, I did it. Thank you for helping. CommanderABab AB Reactions: Posts: 8140 Joined: Tue Jun 07, 2016 21:12 Plugins: Show Version: Beta #### Platform #### Plugin Creator ### Re: JSONarray cannot be converted to JSONObject Ok, glad it helped. ps890giv psdl8bzi< PixelBit1702 Villager Reactions: Posts: 22 Joined: Mon Dec 09, 2019 18:09 Location: Paraná, Brazil. Plugins: Show ### Re: JSONarray cannot be converted to JSONObject Hello, I have back! Sorry for bothering you guys, but I noticed that every of my plugins I added have been disabled because of the mistake with the JSON coding. Yes, I added the brackets in code tab you showed me to fix the error, but it doesn't worked either. But I suppose that the code is not working due to some error with image format, which the size is relative with the frame and it is in png format. (P.S: I forgot to say that I do the drawings in the Paint.net from computer and then I transfer the picture to my phone). Anyways, this is the full code if my plugin (with the image): Code: Select all [{ "id": "$pcw_HsdYBGooJa00",
"type": "residential",
"author": "Plugin creator website 0.5 & TT Brazilian House",
"width": 3,
"height": 3,
"people": 3,
"level": 2
}]
Credit - Contents of this plugin may only be reused if you give credit to the author.
Last edited by CommanderABab on Thu Dec 26, 2019 11:50, edited 1 time in total.
Reason: Formatted code and img

JustAnyone
Community manager
Reactions:
Posts: 2728
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show
Phone model: Nokia 3310

### Re: JSONarray cannot be converted to JSONObject

Code: Select all

[{
"id": "\$pcw_HsdYBGooJa00",
"type": "residential",
"author": "Plugin creator website 0.5 & TT Brazilian House",
"width": 3,
"height": 3,
"people": 3,
"level": 2
}]
This code should work now

CommanderABab
AB
Reactions:
Posts: 8140
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

### Re: JSONarray cannot be converted to JSONObject

It's a nice looking house, but the image has the sun coming the opposite of the TheoTown sun. It might be approved if you flip the image left to right.
ps890giv psdl8bzi<

### Who is online

Users browsing this forum: No registered users and 3 guests

﻿