Skip to content

Allow exchanging readable JSON - #4

Merged
happyDemon merged 2 commits into
mainfrom
readable-format
Nov 9, 2026
Merged

happyDemon merged 2 commits into
mainfrom
readable-format

Conversation

@happyDemon

Copy link
Copy Markdown
Member

Stacked on #3.

Adds a wire-format option for the rare case someone needs it, such as debugging against a server:

SKIR_CLIENT_FORMAT=readable   # default: dense
new SkirClient('https://api.example.test', '/api/skir', WireFormat::Readable);

Readable mode sends Name:number:readable:<readable JSON> and decodes the readable response. Dense stays the default, as the Skir docs recommend for APIs. An unknown value throws SkirClientException::unsupportedFormat() when the client is resolved. Binary isn't offered because it isn't part of the SkirRPC wire protocol.

Requires php-skir/runtime ^0.2 (ReadableJson), so CI is green only after php-skir/runtime#2 is merged.

SKIR_CLIENT_FORMAT (or the WireFormat constructor argument) selects dense,
the default, or readable JSON for requests and responses. Requires runtime
0.2 for ReadableJson.
@happyDemon
happyDemon changed the base branch from cleanup to main November 9, 2026 11:31
@happyDemon
happyDemon merged commit a461adf into main Nov 9, 2026
10 of 14 checks passed
@happyDemon
happyDemon deleted the readable-format branch November 9, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant