medisapp / medisapp.github.io

The official website of Medis
MIT License
5 stars 1 forks source link

PHP serialized data support #13

Closed luin closed 2 years ago

luin commented 2 years ago

https://www.php.net/manual/en/function.serialize.php

jjjrmy commented 2 years ago

+1 on this, Laravel saves serialized data - so it's a bit painful to view

luin commented 2 years ago

A general idea is the parse serialized data to JSON and display it in the JSON viewer. However, it seems tricky when it comes to PHP object. Ex O:8:"stdClass":2:{s:4:"John";d:3.14;s:4:"Jane";d:2.718;}, if we display as:

{
  "John": 3.124,
  "Jane": 2.718
}

We lost the stdClass part, which, if users make changes and save it back, it's very likely not what they expected.

luin commented 2 years ago

Added in 2.8.8. Closing