1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    UK
    Posts
    28
    Answers
    1
    Vote Rating
    0
    BoroChris is on a distinguished road

      0  

    Default Unanswered: How can I get back raw JSON from external server

    Unanswered: How can I get back raw JSON from external server


    Because it is an external server I think that the only option I have is to use Ext.util.JSONP.request but the site that I am using doesn't seem to support a callback mechanism and just returns a pure JSON which then bombs out because it isn't wrapped.

    Is there any other way around this?

    It is so annoying that the call is successful and I can see the data coming back but it bombs out with an 'Unexpected token :' ​because it wants it wrapped.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,217
    Answers
    3518
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The server needs to support JSONP
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    UK
    Posts
    28
    Answers
    1
    Vote Rating
    0
    BoroChris is on a distinguished road

      0  

    Default


    That is a very accurate answer but unfortunately does not help my problem or address the main question which was 'Is there any other way to do this?'

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Location
    Chandigarh (INDIA)
    Posts
    143
    Vote Rating
    0
    sachin sachdeva is on a distinguished road

      0  

    Default


    you can enclose your json in [ JSON] so that it is in Json P format.....It may resolve your problem i have a asame issue but fixed by it.