1. #1
    Sencha User
    Join Date
    Mar 2013
    Location
    Paris
    Posts
    2
    Vote Rating
    0
    Emowpy is on a distinguished road

      0  

    Default Unanswered: Mapping a JSON message with colon in key/name

    Unanswered: Mapping a JSON message with colon in key/name


    Hi,

    I would like to know if there's a way to map a JSON message with colon ":" in keys. Here's an example on my json message:

    Code:
    {
        "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
        }
    }
    And here's the code I'm using for mapping (which is not working) :

    Code:
    Ext.define('MyApp.model.SearchDocModel', {
        extend: 'Ext.data.Model',
    
    
        fields: [{name:'OBJECTID',type:'string',mapping:'succinctProperties.cmis:objectId'},
                 {name:'NAME',type:'string',mapping:'succinctProperties.cmis:name'}
                 {name:'BASETYPEID',type:'string',mapping:'succinctProperties.cmis:baseTypeId'}  
              ] 
    });
    I used several escaping methods but none of them works.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,573
    Answers
    540
    Vote Rating
    311
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Try:

    Code:
    {name: 'OBJECTID', type: 'string', mapping: 'succinctProperties["cmis:objectId"]'}

  3. #3
    Sencha User
    Join Date
    Mar 2013
    Location
    Paris
    Posts
    2
    Vote Rating
    0
    Emowpy is on a distinguished road

      0  

    Default


    Already tried it and it works. I found it in the Ext.data.Field source code.

    Thank you for your help.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi