Plotly get json from plot

How do I get the whole json data from a (already plotted plot). Currently I am not getting all the info. Let me explain ,

Lets say I plot Plotly.newPlot(graph, {x:[...],y:[...]}, layout) then it will plot some (scatter line from layout ) plot with some marker and line options. But If I check the graph.data then I cant find the marker and lines shapes and colors. So how can I get the json containg all the info from this plot?

That info should be in graph.data and graph.layout. Maybe try accessing graph.data[0].marker.color?