Encoder avec Rison

Encode l'entrée avec “Rison” selon la norme correspondante.

Entrée: JSON structuréRésultat: Texte

Saisie de texte

Exécuter pour voir le résultat

Exemples

An enabled flag

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

Entrée

true

Expected answer

!t
Option d'encodage
Encode
An absent value

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

Entrée

null

Expected answer

!n
Option d'encodage
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.

Entrée

["v1", "v2"]

Expected answer

!(v1,v2)
Option d'encodage
Encode
A dashboard filter

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

Entrée

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

Expected answer

(page:2,status:ready)
Option d'encodage
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.

Entrée

"hello world"

Expected answer

'hello world'
Option d'encodage
Encode
Encoding example 1

Entrée

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

Expected answer

(any:json,yes:!t)
Option d'encodage
Encode
Encoding example 2

Entrée

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

Expected answer

ints:435,supportsObjects:!t
Option d'encodage
Encode Object
Encoding example 3

Entrée

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

Expected answer

A,B,(supportsObjects:!t)
Option d'encodage
Encode Array
Object for an array

Entrée

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

Expected rejection

Message contains
Rison Encode - rison.encode_array expects an array argument
Option d'encodage
Encode Array

Outils associés

Format des données

Référence de l’opération

Voir la documentation technique originale (English)