From 6d731cdb511f4719ae14d4d50e5148bbbfb9ba08 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Fri, 13 Jan 2023 20:56:14 +1000 Subject: [PATCH] Update README --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dfc464e..917637d 100644 --- a/README.md +++ b/README.md @@ -60,20 +60,20 @@ parseJson($source); ### Sources A wide range of JSON sources is supported, here is the full list: -- strings, e.g. `{"foo":"bar"}` -- iterables, i.e. arrays or instances of `Traversable` -- files, e.g. `/path/to/large_file.json` -- resources, e.g. streams -- API endpoint URLs, e.g. `https://endpoint.json` or any instance of `Psr\Http\Message\UriInterface` -- PSR-7 compliant requests, i.e. any instance of `Psr\Http\Message\RequestInterface` -- PSR-7 compliant messages, i.e. any instance of `Psr\Http\Message\MessageInterface` -- PSR-7 compliant streams, i.e. any instance of `Psr\Http\Message\StreamInterface` -- responses from the Laravel HTTP client, i.e. any instance of `Illuminate\Http\Client\Response` -- user-defined sources, i.e. any instance of `Cerbero\JsonParser\Sources\Source` +- **strings**, e.g. `{"foo":"bar"}` +- **iterables**, i.e. arrays or instances of `Traversable` +- **files**, e.g. `/path/to/large_file.json` +- **resources**, e.g. streams +- **API endpoint URLs**, e.g. `https://endpoint.json` or any instance of `Psr\Http\Message\UriInterface` +- **PSR-7 requests**, i.e. any instance of `Psr\Http\Message\RequestInterface` +- **PSR-7 messages**, i.e. any instance of `Psr\Http\Message\MessageInterface` +- **PSR-7 streams**, i.e. any instance of `Psr\Http\Message\StreamInterface` +- **Laravel HTTP client responses**, i.e. any instance of `Illuminate\Http\Client\Response` +- **user-defined sources**, i.e. any instance of `Cerbero\JsonParser\Sources\Source` If the source we need to parse is not supported by default, we can implement our own custom source. -
Click here to see how to implement a custom source. +
Click here to see how to implement a custom source. To implement a custom source, we need to extend `Source` and implement 3 methods: