Skip to main content

引数

string
必須
validate する JSON string。function はこの argument を string type checking で読みます。
DecodeOptions
Optional decode options。boolean は useNull を設定します。table は useNull と maxDepth を設定できます。maxDepth は 1 から 4096 に clamp されます。

戻り値

boolean
1 つの complete JSON value の parsing が成功すると true。protected parse block 内で parsing が失敗すると false。
string | nil
parse failure 時の Error message。message は json.validate で prefixed され、near-position suffix を含みます。この return は failure 時だけ存在します。
number | nil
parse failure 時の parser からの Parser byte position。この return は failure 時だけ存在します。

型

DecodeOptions

JSON 解析動作を制御します。

例

string がちょうど 1 つの complete JSON value を含むか確認します。