i am trying to decode below json string, When i var_dump or print_r the string without json_decode it works find but with decode it prints null or empty . Below is my string
$xml ='{"pages":"3","results":"[{"row_id":1,"object_id":46740,"created_on":1608736483367,"title":"Q By Sikander","description":"description changed for edting","subject":"Mathematics","creator":"Sikander. nawaz ","object_lightbox_io":"<mxGraphModel dx="1165" dy="727" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0" /><mxCell id="1" parent="0" ><object label="" Name="question" id="winxapanwzodgiu_0"><mxCell style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=wrap;deletable=wrap;spacingLeft=10;spacingTop=30;strokeWidth=1;glass=0;comic=0;shadow=0;movable=1;resizable=1;strokeColor=#E6E6E6;fillColor=#FFFFFF;cloneable=0;rotatable=0;editable=1;recursiveResize=1;connectable=0;fontSize=12;fontFamily=Verdana;container=1;collapsible=0;spacing=10;allowArrows=0;expand=0;" parent="1" vertex="1"><mxGeometry x="40" y="40" width="750" height="339" as="geometry" ></mxCell></object><mxCell id="winxapanwzodgiu_1" value="Question" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#E8E8E8;fontSize=16;fontStyle=1;align=left;spacing=14;connectable=0;allowArrows=0;recursiveResize=0;expand=0;editable=1;movable=0;resizable=0;rotatable=0;cloneable=0;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry width="150" height="30" as="geometry" /></mxCell><mxCell id="RJBhnMlJpycuwUT1BXIT-1" value="Text" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="381" y="58" width="40" height="20" as="geometry" /></mxCell><mxCell id="m-3Kp1ptq76vWhSLRoxc-1" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="273" y="160" width="80" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-1" value="" style="shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="111" y="222" width="120" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-2" value="" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="471" y="240" width="120" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="214" y="90" width="80" height="80" as="geometry" /></mxCell></root></mxGraphModel>"},{"row_id":2,"object_id":48747,"created_on":1608854400000,"title":"Updated Question ","description":"description changed for edting","subject":"Mathematics","creator":"Sikander. nawaz ","object_lightbox_io":"<mxGraphModel dx="810" dy="631" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0" /><mxCell id="1" parent="0" /><object label="" Name="question" id="winxapanwzodgiu_0"><mxCell style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=wrap;deletable=wrap;spacingLeft=10;spacingTop=30;strokeWidth=1;glass=0;comic=0;shadow=0;movable=1;resizable=1;strokeColor=#E6E6E6;fillColor=#FFFFFF;cloneable=0;rotatable=0;editable=1;recursiveResize=1;connectable=0;fontSize=12;fontFamily=Verdana;container=1;collapsible=0;spacing=10;allowArrows=0;expand=0;" parent="1" vertex="1"><mxGeometry x="40" y="40" width="750" height="339" as="geometry" /></mxCell></object><mxCell id="winxapanwzodgiu_1" value="Question" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#E8E8E8;fontSize=16;fontStyle=1;align=left;spacing=14;connectable=0;allowArrows=0;recursiveResize=0;expand=0;editable=1;movable=0;resizable=0;rotatable=0;cloneable=0;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry width="150" height="30" as="geometry" /></mxCell><mxCell id="RJBhnMlJpycuwUT1BXIT-1" value="Text" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="381" y="58" width="40" height="20" as="geometry" /></mxCell><mxCell id="m-3Kp1ptq76vWhSLRoxc-1" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="273" y="160" width="80" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-1" value="" style="shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="111" y="222" width="120" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-2" value="" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="471" y="240" width="120" height="80" as="geometry" /></mxCell><mxCell id="xlPOsWBx98iv5f53EXYo-3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="winxapanwzodgiu_0" vertex="1"><mxGeometry x="214" y="90" width="80" height="80" as="geometry" /></mxCell></root></mxGraphModel>"}]"}';
if i remove the object_lightbox_io contents and try to decode string 2 times based on whole string and then on results index it gets decoded so problem is coming with object_lightbox_io can someone help me to sort this issue pls , spent hours but coudn't fix it
object_lightbox_iohas unescaped quotes. How is this JSON generated?