Skip to Content
Mar 07, 2015 at 09:50 AM

Issue loading Json data : parsererror



In my application i need to load data from Json file to display in dropdown but getting below error -

Error -

The following problem occurred: parsererror - {

Card: [

{Description: "Switch", enabled: true},

{Description: "Master", enabled: true},

{Description: "VISA", enabled: true},

{Description: "Default", enabled: true},




My code is below -

// Create instance of JSON model

oCardModel = new sap.ui.model.json.JSONModel();

// Load JSON in model

oCardModel.loadData("models/Card.json"); ==========> (json file is available at WebContent/models/Card.json location)

//Card Type

var oCardType = new sap.ui.commons.DropdownBox({

id: "CardType",

tooltip: "Card Type",


var oListCard = new sap.ui.core.ListItem();

oListCard.bindProperty("text", "Description");

oListCard.bindProperty("enabled", "enabled")

// Bind model to table control


oCardType.bindItems("/Card",oListCard );

Can someone please help.