Кодировать с помощью Rison

Кодирует входные данные с помощью “Rison” в соответствии с соответствующим стандартом.

Ввод: Структурированный JSONРезультат: Текст

Текстовый ввод

Запустите, чтобы увидеть результат

Примеры

An enabled flag

An enabled flag. The input is a small public learning fixture; it contains no private production data.

Ввод

true

Expected answer

!t
Опция кодирования
Encode
An absent value

An absent value. The input is a small public learning fixture; it contains no private production data.

Ввод

null

Expected answer

!n
Опция кодирования
Encode
A list of release versions

A list of release versions. The input is a small public learning fixture; it contains no private production data.

Ввод

["v1", "v2"]

Expected answer

!(v1,v2)
Опция кодирования
Encode
A dashboard filter

A dashboard filter. The input is a small public learning fixture; it contains no private production data.

Ввод

{"status": "ready", "page": 2}

Expected answer

(page:2,status:ready)
Опция кодирования
Encode
A string containing a space

A string containing a space. The input is a small public learning fixture; it contains no private production data.

Ввод

"hello world"

Expected answer

'hello world'
Опция кодирования
Encode
Encoding example 1

Ввод

{"any":"json","yes":true}

Expected answer

(any:json,yes:!t)
Опция кодирования
Encode
Encoding example 2

Ввод

{"supportsObjects":true,"ints":435}

Expected answer

ints:435,supportsObjects:!t
Опция кодирования
Encode Object
Encoding example 3

Ввод

["A","B",{"supportsObjects":true}]

Expected answer

A,B,(supportsObjects:!t)
Опция кодирования
Encode Array
Object for an array

Ввод

{"supportsObjects":true,"ints":435}

Expected rejection

Message contains
Rison Encode - rison.encode_array expects an array argument
Опция кодирования
Encode Array

Похожие инструменты

Формат данных

Справка об операции

Открыть исходную техническую документацию (English)