influxdata / influxdata/pbjson

Support Map Fields With Boolean Keys

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
116
Forks
55
PR merge metrics
No merged PRs in 30d

Description

The protobuf specification doesn't disallow booleans from appearing as keys in maps. I'm not entirely sure why one would want this, but currently pbjson produces code that compiles for such fields, but errors during encode with

```
Error("key must be a string", line: 0, column: 0)
```

This should be fixed

Contributor guide

Open the contributing guide

Research direction

Locate the generated map-field encode path and reproduce the failure with a protobuf map whose key is boolean. Compare it with the supported map-key cases, then add coverage for boolean keys and verify that encoding completes without the reported key-string error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.