feat: add JSON-LD response parser for CSS#8
Closed
soyuka wants to merge 3 commits intodunglas:mainfrom
Closed
Conversation
Implements the four missing LDP HTTP methods: - put(): idempotent resource creation/update at a known URI, with optional LDP BasicContainer Link header for container creation - head(): inspect resource metadata without fetching the body - delete(): remove resources or containers - patch(): partial RDF updates via SPARQL Update (default) or N3 Patch Also applies CS Fixer auto-fixes (explicit nullable types, \sprintf). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds ResourceMetadata, a typed value object parsed from HEAD response headers providing: contentType, contentLength, lastModified, ldpType (container vs resource from Link header), wacAllow (parsed permissions), and aclUrl (from Link rel="acl"). Adds getResourceMetadata() to SolidClient as a convenience wrapper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CSS returns expanded JSON-LD by default for Accept: application/ld+json. JsonLdParser uses json_decode directly (not the ml/json-ld processor) since CSS responses are already in expanded form. Provides parse() for normalizing single objects and arrays, and findById() for node lookup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JsonLdParserclass for parsing JSON-LD responses from Solid/CSS serversjson_decodedirectly since CSS returns already-expanded JSON-LD forAccept: application/ld+jsonparse()normalizes single objects and arrays into a consistentlist<array>formatfindById()for node lookup by@idStack
3/8 — builds on #7 (
feat/resource-metadata)Test plan
🤖 Generated with Claude Code