Configure integer overflow in json.decode()

オープン 初心者向け
#5,755 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
lua
領域
documentation

調査の方向性

ペイロードにはファイル名が含まれていません。Tarantool の json モジュールの既存のリファレンスページから始めてください。json.cfg のオプションはそこに記載されています。decode_overflow がすでに説明されているかを確認してください。オプションを、その 2 つの値である clamp(デフォルト)と error とともに追加し、呼び出しごとの指定形式 json.decode(data, {decode_overflow = 'error'}) と、このオプションがどのネストの深さにも適用される旨の注記を加えてください。ページで両方の値と呼び出しごとの上書きが扱われ、動作がコミット 9d9923b02f99e0ada3a5cd5f0d5eb2b2fe0abf13 と一致すれば完了です。

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

説明

The decode_overflow option accepts two values:

  • clamp (default): values below INT64_MIN become INT64_MIN, and values
    above UINT64_MAX become UINT64_MAX.
  • error: raise an error with the location of the overflowing integer.

Use json.cfg({decode_overflow = 'error'}) for an instance, or
json.decode(data, {decode_overflow = 'error'}) for a single call without
changing the instance settings. The option applies at any nesting level.
In-range integers, floating-point input, and encoding are unchanged.
Requested by @Yukigaru in https://github.com/tarantool/tarantool/commit/9d9923b02f99e0ada3a5cd5f0d5eb2b2fe0abf13.

主要言語
CSS
スター
16
フォーク
49
平均マージ
5日 18時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

tarantool/doc のほかの issue

tarantool/doc の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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