mojotech / mojotech/json-type-validation
Feature: dict with number keys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 154
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Currently the dict decoder only supports keys as string types :
https://github.com/mojotech/json-type-validation/blob/c28d34dd7ecc3d89210573abba56f7cf91ae53cf/src/decoder.ts#L403
Would you accept a pull request to provide the ability to decode dicts with numbers as keys? Happy to do the work and raise if so
Contributor guide
No contributing guide indexed for this repository
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 at the dict decoder in src/decoder.ts around line 403, where the issue identifies the current string-key restriction. Trace the existing decoder behavior and determine the expected result for numeric keys; done means dicts with number keys decode successfully without breaking existing string-key support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100