"Unterminated object at character...." error messages

Hello to all Kodular gurus, I may need some help here.
I’m trying to set a Dynamic Component listview using the extension by @yusufcihan but encountered some errors in my json coding.
I have been tried to follow and based on @iamwsumit’s post on multiple listview design.
So my blocks as follows,

While my json codes as below,

{
 "name": "serviceprovider",
 "metadata-version": 1,
 "author": "Mike Chan",
 "platform": [
	"kodular"
 ],

 "keys": [
	   "ID",
	   "Title",
	   "Description",
	   "Area"
         ],

 "components": [
		{
		 "id":"spacebtw1_{ID}",
		 "type": "SpaceView",
		 "properties":{
			"HeightPercent":2
		   }
		 },
		 {
		  "id":"Arrange_{ID}",
		  "type": "VerticalArrangement",
		  "properties":{
				"WidthPercent": 95,
				"AlignVertical": 2,
				"AlignHorizontal": 3
				},

					"components":[
							{
							  "id": "titleverti_{ID}",
							  "type": "VerticalArrangement",
							  "properties": {
									  "WidthPercent": 95,
									  "AlignVertical": 2
									},
										
									   "components":[
											  {
											   "id": "space1_{ID}",
											   "type": "SpaceView",
											   "properties": {
													   "HeightPercent": 1
													 }
											  },
											  {
											   "id": "title_{ID}",
											   "type": "Label",
											   "properties": {
													  "Text": "{Title}",
													  "FontTypefaceImport": "MontserratAlternates-Bold.otf"
													 }
											   },
											   {
											    "id": "space1_{ID}",
											    "type": "SpaceView",
											    "properties": {
													   "HeightPercent": 1
													  }
											   },
											   {
											    "id": "description_{ID}",
											    "type": "Label",
											    "properties": {
													   "Text": "{Description}",
													   "FontTypefaceImport": "MontserratAlternates-Italic.otf"
													  }
											    }
											 ]
							 },
							 
							 {
							  "id": "horizontal_{ID}",
							  "type": "HorizontalArrangement",
							  "properties": {
									 "WidthPercent": 95,
									 "AlignVertical": 2
									},
									
									"components": [
											{
											 "id": "area_{ID}",
											 "type": "Label",
											 "properties": {
													 "Text": "Area:{Area}",
													 "FontSize": 22,
													 "FontTypefaceImport":"MontserratAlternates-Regular.otf" 
												       }
											},
											{
											 "id": "spacearea_{ID}",
											 "type": "SpaceView",
											 "properties": {
													"WidthPercent": 3
												       }
											},
											{
											 "id": "call_{ID}",
											 "type": "Label",
											 "properties": {
													"Text": "phonecall",
													"FontSize": 27,
													"FontTypeface": 7,
													"Clickable": true
												       }
											},
											{
											 "id": "spacecall_{ID}",
											 "type": "SpaceView",
											 "properties": {
													"WidthPercent": 3
												       }
											},
											{
											 "id": "whatsapp_{ID}",
											 "type": "Label",
											 "properties": {
													"Text": "Whatsapp",
													"FontSize": 27,
													"Clickable": true
												       }
											}
										      ]
							 }
						     ]
		 },
		 {
		  "id": "spacebtw2_{ID}",
		  "type": "SpaceView",
		  "properties": {
				 "HeightPercent": 2
				}
		 },
		 {
		  "id": "divider_{ID}",
		  "type": "Label",
		  "properties": {
				 "Width": -2,
				 "Height": 2,
				 "BackgroundColor": -1633771777
				}
		 }
		 
		 
		 ]

So when I test to run in my kodular companion it shows the error like below and the unterminated character is pointing at the red line in the second picture below.


json-code

I have been searching anymore typo but couldn’t find any, or any problem with my json coding. Kindly guide me how to fix this one. Thank you very much. :pray: :pray: :pray:

Try this json

{
 "name": "serviceprovider",
 "metadata-version": 1,
 "author": "Mike Chan",
 "platform": [
	"kodular"
 ],

 "keys": [
	   "ID",
	   "Title",
	   "Description",
	   "Area"
         ],

 "components": [
		{
		 "id":"spacebtw1_{ID}",
		 "type": "SpaceView",
		 "properties":{
			"HeightPercent":2
		   }
		 },
		 {
		  "id":"Arrange_{ID}",
		  "type": "VerticalArrangement",
		  "properties":{
				"WidthPercent": 95,
				"AlignVertical": 2,
				"AlignHorizontal": 3
				},

					"components":[
							{
							  "id": "titleverti_{ID}",
							  "type": "VerticalArrangement",
							  "properties": {
									  "WidthPercent": 95,
									  "AlignVertical": 2
									},
										
									   "components":[
											  {
											   "id": "space1_{ID}",
											   "type": "SpaceView",
											   "properties": {
													   "HeightPercent": 1
													 }
											  },
											  {
											   "id": "title_{ID}",
											   "type": "Label",
											   "properties": {
													  "Text": "{Title}",
													  "FontTypefaceImport": "MontserratAlternates-Bold.otf"
													 }
											   },
											   {
											    "id": "space2_{ID}",
											    "type": "SpaceView",
											    "properties": {
													   "HeightPercent": 1
													  }
											   },
											   {
											    "id": "description_{ID}",
											    "type": "Label",
											    "properties": {
													   "Text": "{Description}",
													   "FontTypefaceImport": "MontserratAlternates-Italic.otf"
													  }
											    }
											 ]
							 },
							 
							 {
							  "id": "horizontal_{ID}",
							  "type": "HorizontalArrangement",
							  "properties": {
									 "WidthPercent": 95,
									 "AlignVertical": 2
									},
									
									"components": [
											{
											 "id": "area_{ID}",
											 "type": "Label",
											 "properties": {
													 "Text": "Area:{Area}",
													 "FontSize": 22,
													 "FontTypefaceImport":"MontserratAlternates-Regular.otf" 
												       }
											},
											{
											 "id": "spacearea_{ID}",
											 "type": "SpaceView",
											 "properties": {
													"WidthPercent": 3
												       }
											},
											{
											 "id": "call_{ID}",
											 "type": "Label",
											 "properties": {
													"Text": "phonecall",
													"FontSize": 27,
													"FontTypeface": 7,
													"Clickable": true
												       }
											},
											{
											 "id": "spacecall_{ID}",
											 "type": "SpaceView",
											 "properties": {
													"WidthPercent": 3
												       }
											},
											{
											 "id": "whatsapp_{ID}",
											 "type": "Label",
											 "properties": {
													"Text": "Whatsapp",
													"FontSize": 27,
													"Clickable": true
												       }
											}
										      ]
							 }
						     ]
		 },
		 {
		  "id": "spacebtw2_{ID}",
		  "type": "SpaceView",
		  "properties": {
				 "HeightPercent": 2
				}
		 },
		 {
		  "id": "divider_{ID}",
		  "type": "Label",
		  "properties": {
				 "Width": -2,
				 "Height": 2,
				 "BackgroundColor": -1633771777
				}
		 }
		 
		 
		 ]
}


Actually the problem was a missing } at end of json and besides that you used twice same id

image

@dora_paz much appreciated on the areas that you have pointed out and now it can work, plus I have modified something to the properties.

1 Like

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