Opened 10 years ago
Closed 4 years ago
#25692 closed enhancement (duplicate)
Update /info/ API endpoints
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.7 |
Component: | Upgrade/Install | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
The /info/
API endpoints need to be updated to use JSON encoding.
Previously: #25311
Attachments (3)
Change History (8)
Note: See
TracTickets for help on using
tickets.
This isn't as simply as switching serialize() to json_encode() (and vice versa) unfortunately.
JSON doesn't support associative arrays, which the API makes use of, all associative arrays are encoded as JSON objects.
PHP's
json_decode()
has support to decode all objects to associative arrays as a result, but unfortunately the API makes use of both objects and associative arrays, so using that breaks the API response formatUnfortunately this means there's only really a few options:
plugins_api()
andthemes_api()
$args
presentmore on #5, it'd be us adding a wrapper around
json_decode()
andjson_encode()
and walking over the returned arrays and if aobject
item is present converting it to an object, something like 25692.layer.diff