Closed twocolors closed 4 years ago
Hmm... I'd like to help, but I don't understand the request.
support set JSON_UNESCAPED_UNICODE (and other) in relay.
Understood. I should be able to get this out tomorrow.
I just wanted to let you know that I've updated the underlying json-rpc package so you can make changes to the JSON format.
Sometimes, people use the JSON client in combination with a third-party client, like Guzzle. In that case, you should be all set to use the new JSON client.
However, if you want to use this lighter-weight "php-json-rpc-http" library, then we'll make a few additional changes for you. This HTTP package instantiates the JSON client internally, within its constructor, and it keeps the JSON client private. We'll have to inject the client, or expose the methods, so you can use your own alternative format.
At any rate, let me know what you think... I'll go ahead with the HTTP changes if you'll use them.
Here's a look at the new client methods: https://github.com/datto/php-json-rpc/blob/master/src/Client.php#L113-L147 https://github.com/datto/php-json-rpc/blob/master/src/Client.php#L179-L210
And here is the matching server method: https://github.com/datto/php-json-rpc/blob/master/src/Server.php#L82-L108
You can skip the built-in JSON-encoding in favor of your own.
thx, mb this help https://github.com/datto/php-json-rpc-http/issues/9 ?
all relay in json, but want use some "Bitmask consisting" for json_encode