Expected literal value at 260

I am try to learn schema for dynamic component extension. I Wrote a sample schema and check it in json formatter it shows valid but in app it gives this error:
Screenshot 2021-03-25 185938

can you send the schema?

Its a sample schema just learning and trying:

{
“name”:“Sample”,
“metadata-version”:1,
“author”:“Saeed”,
“platform”:[
“kodular”
],
“keys”:[
“Number”,
“Image”,
“Text”
],
“component”:[
{
“id”:"{Number}",
“type”:“HorizontalArrangement”,
“properties”:{
“Height”:-1,
“Width”:-2,
“Image”:"{Image}",
},
“component”:[
{
“id”:“LA_{Number}”,
“type”:“label”,
“properties”:{
“FontSize”:18,
“Text”:"{Text}",

		}
		
	}
	]
}
			]

}


You put a extra , remove and see if will work

Screenshot 2021-03-25 194335 now it is giving this error:

I changed some things, try and see if this works

Schema

{
“name”:“Sample”,
“metadata-version”:1,
“author”:“Saeed”,
“platform”:[
“kodular”
],
“keys”:[
“Number”,
“Image”,
“Text”
],
“component”:[
{
“id”:"{Number}",
“type”:“HorizontalArrangement”,
“properties”:{
“Height”:-1,
“Width”:-2,
“Image”:"{Image}"
},
“component”:[
{
“id”:“LA_{Number}”,
“type”:“label”,
“properties”:{
“FontSize”:18,
“Text”:"{Text}",
}
}
]
}
]
}

now its giving this error
Screenshot 2021-03-25 210804

I remake your schema, try now:

Schema

{
“name”:“Sample”,
“metadata-version”:1,
“author”:“Saeed”,
“platform”:[
“kodular”
],
“extensions”: {
“DynamicComponents”: “com.yusufcihan.DynamicComponents.DynamicComponents”
},
“keys”: [
“Number”,
“Text”
],
“components”: [
{
“id”: “HA{Number}”,
“type”: “HorizontalArrangement”,
“properties”: {
“Height”: -1,
“Width”: -2
},
“components”: [
{
“id”: “Label{Number}”,
“type”: “Label”,
“properties”: {
“FontSize”: 18,
“Text”: “{Text}”
}
}
]
}
]
}

no it doesnt work
unterminated object at character 236…

For some reason when i post the schema in the post it stop working
Try to open this txt and copy paste in schema block
schema.txt (547 Bytes)

wait I am trying it again

Thanx, it is working.
Can you tell what were the mistakes in my schema?

You forget to add the extension on the json.

Instead of “component” it should be “components”

You used some , on the final items. I removed them

I removed this because i don’t know if you can put images on arrangements

Thanx again for this

No problem :slightly_smiling_face:
Please, mark the post as solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.