Bookmarks API broken JSON output
Doing a call on api/v1/bookmarks returns invalid JSON which can't be parsed. Compare with api/v1/favourites for instance which is totally fine.
Experienced on pixelfed.social
Screenshot from a response from a rest client - first one is fine (favourites), second one is broken (bookmarks).


Fixed in #2324
Sorry, but the fix isn't actually working.
The problem is that StatusService::get is returning a json string. And the response of the api is also json, so it's still double encoded.
Not sure what the actual best way forward is. I would opt not to store the json in the StatusService in the cache, that way, calling get on that class returns the object and the implementer can still decide what to do.
Ok, playing around with the coldGet and using toArray fixes the return for the bookmarks api controller, however, redis doesn't like to store an array, so that call than crashes.
Calling json_decode in the controller seems really redunant, but maybe that really is the only option, see pull request at https://github.com/pixelfed/pixelfed/pull/2377
Fixed!