Type safe getters for JSON fields
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- PHP
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I've been working on an application where we've started adding JSON fields to our database, and I've seen a developer writing this:
$tagList = $row->getString("tags") ? json_decode($row->getString("tags")) : [];
An obvious code smell that would be greatly improved by some json functionality in the database layer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the database layer’s existing getString API and how JSON fields are currently represented. Clarify the getter names, return types, decoding behavior, and test expectations before implementing the requested type-safe JSON access; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100