使用例
Format an invoice identifier without changing its digits
入力
{"invoice_id":9007199254740995}Expected answer
{
"invoice_id": 9007199254740995
}{
"invoice_id": 9007199254740995
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
Keep a quoted invoice identifier as a string
入力
{"invoice_id":"9007199254740995"}Expected answer
JSON{
"invoice_id": "9007199254740995"
}{
"invoice_id": "9007199254740995"
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
Convert an annotated JSON5 request policy into strict JSON
Make the formatter's permissive input behavior visible, then check the output with a strict JSON parser.
入力
{ // Request policy
timeoutMs: 5000,
retries: 2,
}
Expected answer
JSON{
"timeoutMs": 5000,
"retries": 2
}{
"timeoutMs": 5000,
"retries": 2
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
A support ticket with a zero-prefixed identifier
入力
{"ticket":"00123","priority":"high"}Expected answer
JSON{
"ticket": "00123",
"priority": "high"
}{
"ticket": "00123",
"priority": "high"
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
An observatory reading with a negative temperature
入力
{"station":"demo-observatory","temperatureC":-12.5,"open":false}Expected answer
JSON{
"station": "demo-observatory",
"temperatureC": -12.5,
"open": false
}{
"station": "demo-observatory",
"temperatureC": -12.5,
"open": false
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
A café menu with Unicode and a decimal price
入力
{"item":"café","price":3.5,"currency":"EUR"}Expected answer
JSON{
"item": "café",
"price": 3.5,
"currency": "EUR"
}{
"item": "café",
"price": 3.5,
"currency": "EUR"
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
A safe webhook retry policy
入力
{"timeoutMs":5000,"retries":2,"enabled":true}Expected answer
JSON{
"timeoutMs": 5000,
"retries": 2,
"enabled": true
}{
"timeoutMs": 5000,
"retries": 2,
"enabled": true
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
An image manifest with a null caption
入力
{"width":640,"height":480,"caption":null}Expected answer
JSON{
"width": 640,
"height": 480,
"caption": null
}{
"width": 640,
"height": 480,
"caption": null
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
A release note with an embedded newline
入力
{"version":"2.1.0","notes":"Fixed parser\nAdded tests"}Expected answer
JSON{
"version": "2.1.0",
"notes": "Fixed parser\nAdded tests"
}{
"version": "2.1.0",
"notes": "Fixed parser\nAdded tests"
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On
An empty search result
入力
{"results":[],"total":0}Expected answer
JSON{
"results": [],
"total": 0
}{
"results": [],
"total": 0
}- インデント文字列
- オブジェクトキーをソート
Off- 書式設定済み
On