3 ms·
S-expresions are really just a way of representing a tree of data (in Lisp code, the S-expression literally represents the abstract syntax tree that is used for
by nv-vn 10y ago
S-expresions are really just a way of representing a tree of data (in Lisp code, the S-expression literally represents the abstract syntax tree that is used for the code).
Take the JSON example:
{
"IDs": [116, 943, 234, 38793],
"Settings": { "Aperture": 2.8, "Shutter speed": "1/250" }
}
You could rewrite this as an S-expression as:
((IDs (116 943 234 3879))
(Settings
(Aperture 2.8)
("Shutter Speed" "1/250")))
- omginternets 10y agoThanks! I figured it would be simple, and indeed it was :)