formform.io
API for the io
module of formform
.
print-expr
(print-expr expr)
Given an expression, returns a string of its representation in formula
notation.
read-expr
(read-expr s)
(read-expr opts s)
Given a string in formula
notation, returns the corresponding data structure that can be processed by formform.expr
.
Can be given a map with the following options:
:sort-code
-> to specify a differentsort-code
forformDNA
interpretation (seeformform.calc/sort-code?
)
uniform-expr
(uniform-expr expr)
(uniform-expr opts expr)
Given an expression, returns a uniform
data structure that is a nested map with the following pattern:
{:type <expr-type>
…
:children [<uniform> …]}
Can be given an option map to support various customizations (see source), e.g. the :legacy?
flag can be set to output a map that can be used as formJSON
for backward compatibility with formform 1.