What is the problem with MongoDB storing JSON objects?

if a field in a Mongo database is a JSON object, is it better to store it directly as an object or serialize it into a string and store it again? what are the advantages and disadvantages of the two methods? Is there any difference between performance and space size? Why?

Sep.11,2021

if there is a query requirement (or potential query requirement) for the fields in this object, it is obviously better to store it as an object, because there is no way to query a string at all.
in terms of writing efficiency, objects are eventually serialized to BSON,. Usually BSON is smaller than JSON, so writing to strings does not have an advantage.
in various scenarios, I just feel that serialization and deserialization of objects take more time than strings. But then again, since JSON, doesn't serialize and deserialize at the driver level, it's bound to be done somewhere else, so it makes no difference.
in short, objects are superior to strings in every way.

Menu