I think, not 100% sure that this was the real reason the WP developers took this approach, but common sense tells me that serialize preserves the variable types and have a mini built in error detection, and json stores only string values { key : value }, so when you go back to PHP you will have to guess the format, or make a parser for it. This will force you to have two different ways to handle your data: previous, to storing the data as json and after decoding the json it will come back as a totally different object.
This is the main reason the difference in size, PHP is storing not only an array; it is storing how many elements were in the array when it was serialized, their types, and their values.
You are not storing only key value pairs on the database but you may also be storing an object with different variable types.
Related Posts:
- Dealing with Many Meta Values, 30+
- What is the most secure way to store post meta data in WP?
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- Meta query interfering with orderby relevance
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- How to solve slow WordPress site caused by attachment_metadata
- Delete all post meta except featured image
- Is it possible to store visitors IPs in wp_postmeta table?
- Multiple postmeta with same name for one post in wp_postmeta table
- Delete all post meta except featured image Using SQL
- One post carries 30 postmeta values, is this too much?
- delete post meta from db, even if does not exist?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Storing data for a wordpress plugin
- Where does the actual data stored by add_post_meta
- Structure of postmeta meta_value for woocommerce product download
- Routine to convert custom post meta from old to new value
- Saving zero as meta value
- Uknown meta entries in wp_postmeta
- Does post_meta data need to be unserialzed?
- Link image with data from the wpdb
- Custom Post Type not showing anything added by code anymore?
- Compare User meta_value with Product meta_value
- How to save EXIF metadata in WordPress database?
- _wp_attachment_metadata is not being added to database when PDF files uploaded
- “BS_” rows in postmeta table
- Migrating meta_key and meta_value from old theme to new one
- Database structure for thousands of posts
- How much post meta data is too much?
- How do i get value from wp_postmeta?
- Recommended Post Structure for DB Storage
- SQL query : Select a thumbnail for a media
- Importing 10 Years of Media into the WP Database
- Importing Data from a Non-WordPress database, into WP
- 2 WordPress sites with 2 databases but sharing the same users
- Insert Query not working in the form
- How to get nav_menu_item_id and slug from wp database
- connecting to DB from custom php file
- Is there a way to execute a php script outside WordPress?
- Make changes of wp-db.php file persistent against updates
- How can I restrict php mail() to only send me one email after a db error
- Importer fails to import every post
- Change the default data installed when setting up WordPress
- Remove “%” from strings in serialized arrays in wp_postmeta
- How to delete post comments from the database via SQL statement?
- Clear Terms from Taxonomy for Specific Post IDs?
- Why does changing Database Table Prefixes result in loss of content?
- Buddypress avatar image in database [closed]
- WordPress security [closed]
- How to split the WordPress database?
- $wpdb->get_var – What value is returned when zero records are found?
- SymmetricDS in dev + prod workflow?
- Fixing YARPP plugin FULLTEXT MySQL indexing
- What is wrong here? Issue with post_id and meta_value
- Advantages of dbDelta
- Only allow user to access a link once a year, based on their joining date
- Error establishing a database connection in wordpress site , website not opening
- Counting post and changing roles in mysql database. Query not code
- wpdb Insert unknown post data dynamic foreach loop
- How do I use a database in a custom theme?
- Deleting empty meta key values
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- WP 5.5, child themes, customizer and a weird cache issue
- How do you enable scripts on a WordPress installation in Softaculous?
- How to rerieve comments and their replies from DB
- Inserting data with Geometry field
- I Want a More Concice Form of Data than an Array
- Export only a part of the database for migration
- Why am I being prompted to reinstall wordpress?
- What’s the easiest way to connect external database and display data on wordpress?
- Duplicate database to roll back theme & content changes
- database error WordPress move from one hosting to other
- Select data from foreach loop and send it to wordpress database
- mySQL database size large, but tables size less
- Error establishing database connection error during first WordPress run
- Same DB for live and dev versions
- update multiple user meta field based on another meta field
- After renaming MySQL database, I can no longer access my Blog page
- execute custom function on database connection error
- Call to a member function insert()
- Create a new table on the database and save parameters from a contact form
- version control for wordpress? (wordpress folder and database at same time)
- not saving post in wp_post wordpress database table
- How to add data from wordpress tables to new database tables you have created
- Mysterious template change after database import/export
- Creating Tables in WordPress Database
- Calling update_user_meta inside of another function doesn’t work
- Install WordPress with SQL database
- How to back-up a database on IIS
- Creating Job Tickets
- $wpdb->prepare returns empty array
- Best db table structure for users with many records
- Where are database files of a WordPress website?
- WP_Query by meta key not returning any posts
- Uploaded images not displaying full size preview or inserting into posts
- Many images in wp-content/uploads folder that are not in Media Library
- Order of search results based off of a backend custom field and also in alpha order
- How to find fresh (last modified) and sql backup?
- Understanding Redundant postmeta Tables in WordPress Database
- Database table prefix different between wp-config.php and in database