I would like to know how can I escape colons in JSON path.
Here's an example of my JSON string:
{
"succinctProperties": {
"cmis:objectId": "35589dd4-647f-4a6d-884f-0575d8a93127",
"cmis:name": "35589dd4-647f-4a6d-884f-0575d8a93127",
"cmis:createdBy": "<unknown>",
"cmis:lastModifiedBy": "Wed Jun 05 16:26:56 CEST 2013",
"cmis:creationDate": 1370442416100,
"cmis:lastModificationDate": 1370442416100,
"cmis:changeToken": null,
"cmis:baseTypeId": "cmis:document",
"cmis:objectTypeId": "cmis:document",
"cmis:isImmutable": false,
"cmis:isLatestVersion": true,
"cmis:isMajorVersion": true,
"cmis:isLatestMajorVersion": true,
"cmis:versionLabel": "35589dd4-647f-4a6d-884f-0575d8a93127",
"cmis:versionSeriesId": "version_series_id",
"cmis:isVersionSeriesCheckedOut": false,
"cmis:versionSeriesCheckedOutBy": null,
"cmis:versionSeriesCheckedOutId": null,
"cmis:checkinComment": "",
"cmis:contentStreamLength": 210028,
"cmis:contentStreamMimeType": "application/octet-stream",
"cmis:contentStreamFileName": "35589dd4-647f-4a6d-884f-0575d8a93127",
"cmis:contentStreamId": null
}
}
I'm trying to map keys with my ExtJS store using this as a model:
Ext.define('MyApp.model.SearchDocumentModel', {
extend: 'Ext.data.Model',
fields: [{name:'OBJECT_ID',type:'string',mapping:'succinctProperties.cmis:objectId'},
{name:'NAME',type:'string',mapping:'succinctProperties.cmis:name'}
]
});
I used several escaping methods but none of them works.
When I load this I got this as an error:
Uncaught SyntaxError: Unexpected token ILLEGAL
Thank you.