Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Request: Support for Strings Containing `\0` Characters

オープン
#895 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 12 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c

調査の方向性

この issue では、ファイル、テスト、エントリーポイントが指定されていません。まず cJSON の文書化された文字列処理と公開 API を確認してください;完了には、埋め込み null 文字に対応する長さを考慮した設計と、それに対応するサポートについて合意する必要があります。

索引モデルが issue の本文から書いたものです。

説明

Thank you for maintaining cJSON, it has been very helpful in many of our projects!

However, I’ve encountered a limitation regarding how strings are handled within the library. As the documentation mentions, cJSON currently doesn't support strings that contain null characters (\0) because it relies on null-terminated strings.

This limitation makes it difficult to work with data that contains embedded null characters, especially when dealing with binary data or certain encodings. I understand that this might be a fundamental design choice due to how strings are managed in C, but I was wondering:

Are there any plans to support strings with null characters (\0) in future versions of cJSON?

If not, would there be any recommended approaches for handling such data within cJSON?
Having the ability to handle these strings, possibly through a function that allows specifying the string length explicitly (similar to strncpy), would greatly expand the library’s utility in various use cases where binary data is involved.

Thanks in advance for considering this request, and I look forward to your response!

Best regards

主要言語
C
スター
13k
フォーク
3.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DaveGamble/cJSON のほかの issue

DaveGamble/cJSON の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。