CLIs to convert between Linden Lab Structured Data (LLSD) and JSON.
Example:
$ echo '<llsd><map><key>name</key><string>Ruth</string></map></llsd>' | llsd2json | jq -r .name
Ruth
Install llsd2json with pip or pipx
pipx install llsd2json
usage: llsd2json [-h] [--format {auto,xml,binary,notation}] [input]
Convert LLSD to JSON
positional arguments:
input LLSD string (default: stdin)
options:
-h, --help show this help message and exit
--format {auto,xml,binary,notation}, -f {auto,xml,binary,notation}
LLSD format
usage: json2llsd [-h] [--format {xml,binary,notation}] [input]
Convert JSON to LLSD
positional arguments:
input JSON string (default: stdin)
options:
-h, --help show this help message and exit
--format {xml,binary,notation}, -f {xml,binary,notation}
LLSD format
Conversion between LLSD and JSON is not perfectly bi-directional. JSON does not
support several LLSD data types such as date
, binary
, uri
, and has no
distinct number types.