我正在使用如下所示的长字符串化JSON向我的应用程序发出POST请求:
/////POST PARAMETER VALUE
{"objects":[{"type":"path","originX":"center","originY":"center","left":118.63,"top":252.5,"width":41,"height":139,"fill":null,"overlayFill":null,"stroke":{"source":"function anonymous() {var patternCanvas = fabric.document.createElement('canvas');patternCanvas.width = patternCanvas.height = 10;var ctx = patternCanvas.getContext('2d');ctx.stroke`Style = quotesquare005E7Aquote;ctx.lineWidth` = 5;ctx.beginPath();ctx.moveTo(5, 0);ctx.lineTo(5, 10);ctx.closePath();ctx.stroke(); return patternCanvas;}","repeat":"repeat","offsetX":0,"offsetY":0},"strokeWidth":15,"strokeDashArray":null,"strokeLineCap":"round","strokeLineJoin":"round","strokeMiterLimit":10,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,"shadow":null,"visible":true,"clipTo":null,"path":[["M",40.5,0],["Q",40.5,0,41,0],["Q",41.5,0,41.25,2],["Q",41,4,38,16.5],["Q",35,29,29.5,42],["Q",24,55,21,65],["Q",18,75,15.5,83.5],["Q",13,92,9.5,101.5],["Q",6,111,4.5,118],["Q",3,125,2,128],["Q",1,131,0.5,134],["Q",0,137,0,138],["L",0,139]],"pathOffset":{"x":0,"y":0}}],"background":""}
////// END
每次我做这个请求时,都会丢失价值。在服务器中,我突出显示的部分丢失了。我意识到它是字符串的特定索引范围。当我以这种json字符串格式给出另一个数据时,它再次丢失该索引范围内的部分。而且我确定我发送的值已经完成,因为我在请求标题处检查了它。
问题不在于我的代码,因为我用POSTMAN应用程序测试它,结果是一样的。
任何人都可以帮助解决这种神秘的情况。此值中是否有任何导致某些转义的内容。我正在使用Codeigniter。
由于