[wp-trac] [WordPress Trac] #60950: JSON serialization for meta values

WordPress Trac noreply at wordpress.org
Sun Apr 7 09:43:39 UTC 2024


#60950: JSON serialization for meta values
--------------------------------+-----------------------------
 Reporter:  inf3rno             |      Owner:  (none)
     Type:  feature request     |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 It would be nice to have JSON serialization for complex meta values like
 arrays. MySQL and other databases support
 [https://dev.mysql.com/doc/refman/8.3/en/json-search-functions.html JSON
 specific functions] like JSON_CONTAINS, JSON_OVERLAPS, JSON_SEARCH, etc.
 we could use for building new comparators. Currently all we can do with
 these complex meta values if we want to search them is unpacking them.
 Either we read all the database records and compare them with PHP (which
 requires a lot more resources) or we put them in separate meta values to
 make them searchable, comparable (which bloats the database). A really
 ugly hack some people do is searching the PHP serialized form of a partial
 value with LIKE comparator. If people are so desperate, then I think it is
 a sign that this is a really needed feature...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60950>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list