:as-response
which should accept the data returned by a handler and the context. You can check the media-type in (get-in ctx [:represenation :media-type]) and if it’s json call your json library of choice. For the other media types you can delegate to liberator.representation/as-response.