JSONarray cannot be converted to JSONObject

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

JSONarray cannot be converted to JSONObject

#1

Post by PixelBit1702 » Wed Dec 11, 2019 1:24

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.

User avatar
Ø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

#2

Post by Ølsken » Wed Dec 11, 2019 2:04

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"}],
ImageJust my opinion

User avatar
PixelBit1702
Villager
Reactions:
Posts: 22
Joined: Mon Dec 09, 2019 18:09
Location: Paraná, Brazil.
Plugins: Show

Re: JSONarray cannot be converted to JSONObject

#3

Post by PixelBit1702 » Wed Dec 11, 2019 2:20

Well, in the frames I added the picture of my plugin, but still not working. :(

User avatar
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

#4

Post by CommanderABab » Wed Dec 11, 2019 2:58

Why not quote this, copy your code and paste it -->

Code: Select all

here
:)
ps890giv psdl8bzi<<psdl8bzi psdl8bzi psdl8bzi psdl8bzi psdl8bzi

User avatar
PixelBit1702
Villager
Reactions:
Posts: 22
Joined: Mon Dec 09, 2019 18:09
Location: Paraná, Brazil.
Plugins: Show

Re: JSONarray cannot be converted to JSONObject

#5

Post by PixelBit1702 » Wed Dec 11, 2019 4:14

Ok, I did it. Thank you for helping. :) ;)

User avatar
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

#6

Post by CommanderABab » Wed Dec 11, 2019 8:23

:?: Ok, glad it helped. :)
ps890giv psdl8bzi<<psdl8bzi psdl8bzi psdl8bzi psdl8bzi psdl8bzi

User avatar
PixelBit1702
Villager
Reactions:
Posts: 22
Joined: Mon Dec 09, 2019 18:09
Location: Paraná, Brazil.
Plugins: Show

Re: JSONarray cannot be converted to JSONObject

#7

Post by PixelBit1702 » Thu Dec 26, 2019 5:57

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,
    "frames": "frames":[{"png":"TTHouseMadeByPixel1702.png}],
     "people": 3,
    "level": 2
}]
Credit - Contents of this plugin may only be reused if you give credit to the author.
Image
Last edited by CommanderABab on Thu Dec 26, 2019 11:50, edited 1 time in total.
Reason: Formatted code and img

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

Plugin Creator

Platform

Re: JSONarray cannot be converted to JSONObject

#8

Post by JustAnyone » Thu Dec 26, 2019 10:00

Code: Select all

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

User avatar
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

#9

Post by CommanderABab » Thu Dec 26, 2019 11:53

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<<psdl8bzi psdl8bzi psdl8bzi psdl8bzi psdl8bzi

Post Reply Previous topicNext topic

Return to “Problems and Errors (bugs)”

Who is online

Users browsing this forum: No registered users and 3 guests