Skip to content

Reject dicts with non-string keys explicitly #54

@bbopen

Description

@bbopen

Summary

Python dicts with non-string keys can fail JSON serialization; this should be detected and surfaced explicitly.

Failure mode

  • json.dumps raises TypeError for non-string keys.
  • Failure surfaces as a protocol error without actionable messaging.

Repro (adversarial)

  • Add a fixture that returns {1: "one", ("a", "b"): "tuple"}.
  • Call through NodeBridge and verify explicit error message.

Acceptance criteria

  • Non-string dict keys are rejected with a clear error before encoding.
  • Adversarial tests cover this case.

Metadata

Metadata

Assignees

Labels

area:codecArea: codecs and serializationenhancementNew feature or requestpriority:p3Priority P3 (low)

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions