recherche

Maison  >  Questions et réponses  >  le corps du texte

javascript - JSON.stringify后得到的对象不完整

$scope.upLoad = function() {

var emImage = "iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAgAElEQVR4Xu18CXxU1dn+c2efzCSZZLLvBBJCwhLWghSkior7vmNFwKr/1n6fy1dBrdZqW2ut1rVqKWq/Ki4IKorsyCYqsmchIQnZM9m32Zc733NuMmQBkaBW/78f9+flTuZu5zzned/3ed9zRgmnt5NGQDrpK09fiNNgDYEEp8E6DdYQEBjCpaeZdRqsISAwhEt/zMyS8vLytIWFhd4h9Od7vfRHCdbo0aPP8QDv+CTJEibLy4Oy/GpxcfHq7xWJk3j4jwqsESNGROj0+oKAJKVe09aGs+UAHjKHo1WvRzAY/LvX672rrKyMOJ78lp2dHaNWq59UqVTtgUDgsUOHDrWe/N0Dr/xRgUWzm+eRpH8meL2qJyvKEJ6RgS119fgoKQlHDEafWpIuLCgoWD+UzvKZCwMB+UVIUlCtkpbTrOfy/uBQnhG69kcBVm5u7niO/I0+4J7ba2owobsLYTot4oelo6qtE/rGJqyOjcFriUnQBwKlWkm6jKAVf1OHR40aNVqlkg4+/8x9MLqLcO/vP0C7Q/0wGfbCqTDsBwdr3Lhxyd5AoIodVz9QUY5hLhdkjntcdATS05JQJmvR1dYOVW0tjhiN+DAuDvvMZpBlj7DTazQaTYff73fR1Nw0U1qw5DGbzW6PxzNOloNPZ2fG/3TlqpdQvv5xrHj/U/xzs7FGBfn2U/GBPzhYuXl5j8T6fA9d2diAiZ3dEAmYAGt4ahwio6LQYjSjwyfDuW8v1Pw+yPNfmSPwfIwFPujgkTVQa7SySgo6JQl+Hl2SCg6NCtGtrR2WA9v+pWqrX4+mwrVosrXgkRURkGXpT0VFBfd/EzMHn//hwRo9evvs5ubp57W2IjLgh4otDBCU3OEp0IeFwa43oklm7wsOIuj3K4D5ude9extqvypBN820rroK9oAR3qAG3T4j2rrVaLZLiDf7sPLVxfh42R9hgB1mg4RHP7DA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1YigmV5z09kYPjqD4DLyiqhNRq98by+ee6sJdqd8A53+su8MLOHgFy68ddj8+QuQn59Pk9OcElir16zFJ2+9jnzDP5CxLwxJ+/SQ6cwl+i8BlsRBcLBDXuaM727ZhKZcPcImW3DtVTPgcnrh93io4N18t5tmQ/NifqRRy9BqJLQ1ObFxRTVM4WqYLUFkTxuFqdffhvqiAnhaKwishPbmTni7WlFe242n1/Dd0Pg5iImlpaUtpwQWNVQc0dfSCSpeliyS6ai/WrBgYeq3BWvdurX4+9K3cFH70/jJlghIemoDodGYH4bAUmm1aLdEY+O7K/FxrBpTrjIhw5qFgN+LrqYGViHcMJqD0NODh0eEIcysg8GoJRsD2Li6CWEmFSJjNbj8d3cyvYpC5baPkZkdA1tNBxprWrH3s0P4pDIGdY6wKqZXn5FVSjQaEljjx4+PpZAsIblFMjbgZiGp5t+yALdwnzhx/Ckza926dXh92Ztoe+Vl/DGMjt3IYCHA6scsSadHE3WZr64BJWWleFYvY8JwPSyxRky9eDKBMKGxohQuextBCjDg6BEepcPyJ+oRNJIrGh8Wrf0zjJHp2PLamyjatg6jx8QjOT2VGYCRuxYvvteIFZ86gtSJIqyPIWBFQwIrJy/vgyk+zyVnsT7upikIha5yOxV1LfGp+Xffg8RFizFjzJhTBmvFhvXwP/VXlC5dirMTosiMcD47BJZgGUWqVg9HUEZ3Yho8qz+m4+7ANrZBZJ67o4CfZYdh2kVZCLdGIm5YEuJZRNy3/QB2fWXDpLxYJGUnw5KVDktyNv5y/Z0s3TDSJmoQFqEmeTWIsEQgIS4SlS1qrNj";

var requestdata = JSON.stringify({
    "base64File": emImage
});
console.log("requestdata>>>>>>>>>>>>>>>>>" + requestdata);

}

JSON.stringify后得到的对象不完整,求赐教!

补充:由于结果太长没显示出来 我描述下:输出结果末尾会比转化前少一部分 而且少的部分长度正好是字符串"base64File"的长度

ringa_leeringa_lee2812 Il y a quelques jours2255

répondre à tous(4)je répondrai

  • 迷茫

    迷茫2017-04-11 10:26:31

    JSON.stringify返回的是转化为字符串的json
    不太清楚你的对象不完整指什么,想要获得对象的话,应使用JSON.prase(requestdata)

    répondre
    0
  • PHPz

    PHPz2017-04-11 10:26:31

    可以把 JSON.stringify()输出的字符串帖到下面网站去。检查一下就知道了。
    json.cn

    répondre
    0
  • 大家讲道理

    大家讲道理2017-04-11 10:26:31

    贴一下你解析出来的结果

    répondre
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-11 10:26:31

    谢谢大家的关注;我找到问题了,问题是Android studio的console.log()在Logcat里有长度限制....

    répondre
    0
  • Annulerrépondre