What are the differences between JSON and JSONP?

后端 未结 8 1824
感情败类
感情败类 2020-11-22 03:53

Format wise, file type wise and practical use wise?

相关标签:
8条回答
  • 2020-11-22 04:20

    JSONP is a simple way to overcome browser restrictions when sending JSON responses from different domains from the client.

    But the practical implementation of the approach involves subtle differences that are often not explained clearly.

    Here is a simple tutorial that shows JSON and JSONP side by side.

    All the code is freely available at Github and a live version can be found at http://json-jsonp-tutorial.craic.com

    0 讨论(0)
  • 2020-11-22 04:21

    JSONP is essentially, JSON with extra code, like a function call wrapped around the data. It allows the data to be acted on during parsing.

    0 讨论(0)
提交回复
热议问题