We are starting to use the MySQL json datatype. Is there any recommended best practices when storing default values as NULL
or {}
for the JSON datatype? What are the PROs and CONs for each?
This would depend upon your business use-case.
null
is usually meant to indicate that the value is unknown/doesn't
exists. {}
on the other hand means that the value is known/does
exist and the known value is an empty JSON object {}