Skip to Content
0
Jun 19, 2020 at 02:17 PM

How to change JS model to JSON model in SAPUI5 default template

221 Views Last edit Jun 19, 2020 at 02:21 PM 2 rev

Hi Guys,

I am learning SAPUI5 from OPENSAP where i was using WEBIDE SAPUI5 template for bootstrapping. In the models and internationalization section, i found that the tutor was using JSON model while the SAPUI5 template creates JS model.

I tried changing the file extension from .JS to .JSON in manifest "models" section. But below error throws.

MANIFEST.JSON:

"models": {
"models": {
"type": "sap.ui.model.json.JSONModel",
"uri" : "model/models.json"
}
}

Please let me know how can change between JS to JSON model, where the config has to be maintained ?

Attachments

capture.png (62.0 kB)