From a Request content string and the header content encoding string, decompress and decode the info returning a Json String or null if cannot find a proper method.
This project using composer.
$ composer require neogreco/json-request-parser
Parse a json data
<?php
use JSON\tools\JSONRequestParser;
class SomeController extends Controller
{
public function index(Request $request)
{
try {
$json = JSONRequestParser::extractJsonFrom($request->getContent(), $request->header('Content-Encoding'));