mafintosh / mafintosh/hyperdb

Half-baked: JSON-to-hyperdb mapping

Open
#136 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
748
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Does there already exist a deterministic 1-to-1 mapping between a JSON document and a key/value store like hyperdb? What I mean is taking one (possibly very large) JSON object and splitting it so each "atom" (integer, boolean, string, etc) ends up as a single Value in the database. Eg:

{
  "a": ["red", "blue"],
  "num": 1234,
}

mapping to something like:

/a[]/[0 -> '"red"'
/a[]/1 -> '"blue"'
/num -> '1234'

This could make for a nice high-level API to hyperdb, where applications just get a JSON-like object (whatever that maps to in their native language, eg nested dicts in python). I'm not proposing the opposite (hyperdb-to-JSON), though that might also be a desirable feature, and is trivial in the case of either a single flat JSON object (with full hyperdb paths as keys) or via nested Objects, one per path.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing hyperdb's existing API and clarify the deterministic JSON-to-key/value mapping and API scope; done would require an agreed design and implementation criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.