simdjson / simdjson/simdjson

Detect if any keys have non-ASCII characters

Open
#264 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
24.3k
Forks
1.3k
Avg merge
1d 3h
Merged PRs (30d)
16

Description

Non-ascii keys seem pretty weird, but I guess they must be out there. Normally, there are no keys like this and so you can deal with strings in a fast and simple way, e.g. using strcmp without having to canonicalize both strings being compared. So, it would be nice if there was some indicator that at some point in the JSON document there is a non-ASCII character in a key, causing parsers built on top of simdjson to be more careful. It's easy to vectorize the check for non-ascii characters. I don't know what priority this should have, or the exact API (a simple bool?), but I thought I would bring it up.

Contributor guide

Open the contributing guide

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

The issue does not name a file, test, or existing entry point. Start by reviewing simdjson's key-parsing and string-comparison APIs, then examine how parser users could observe non-ASCII keys without unnecessary canonicalization. Done means an agreed API, documented behavior, and coverage for documents with and without non-ASCII key characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
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.