When do you want toJSON?

  node.js, question

I would like to ask when to write toJSON.
I wrote a demo with react-redux.
In reducer图片描述, my web console can output图片描述Here my code inside does not have toJSON.
But I have to do TOSJSON in components inside, as shown in the figure图片描述There would be no corresponding data on my page without toJSON at the arrow position.图片描述
You’d better tell me something about Why? There is still time to use toJSON, thank you ~

You only need to distinguish the data structure and JSON (string describing the data) in the program, and this problem is easy to understand.