Expand description
Conjure’s simplified JSON format for parameters and solutions.
Matches Conjure --output-format=json: integers and booleans are JSON scalars, sets and
tuples are arrays, records are objects, and int-indexed matrices are objects whose keys are
the printed index values. Non-int-indexed matrices encode as arrays.
Functions§
- canonical_
simplified_ json_ string - Render pretty JSON with stable key order for golden comparisons.
- domains_
from_ model - Collect find/given domains from a model for JSON parsing guidance.
- literal_
from_ simplified_ json - Decode a simplified JSON value, using
domainto disambiguate arrays and objects. - literal_
to_ simplified_ json - Encode a literal in Conjure’s simplified JSON format.
- param_
model_ from_ assignments - Build a parameter model of value-lettings from simplified JSON assignments.
- params_
from_ simplified_ json - Parse a parameter JSON object using given domains from the problem model.
- params_
from_ simplified_ json_ str - Parse parameter JSON text.
- params_
to_ simplified_ json - Render a parameter file as a single simplified JSON object.
- solution_
from_ simplified_ json - Parse a single assignment object.
- solution_
to_ simplified_ json - Render a single assignment as a simplified JSON object.
- solutions_
from_ simplified_ json - Parse a Conjure-style solutions JSON document (array, or a single object).
- solutions_
from_ simplified_ json_ str - Parse solutions JSON text.
- solutions_
to_ simplified_ json - Render solutions as a JSON array of assignment objects (Conjure
--solutions-in-one-file). - solutions_
to_ simplified_ json_ string - Pretty-print solutions in Conjure’s simplified JSON layout.
- write_
simplified_ json - Append pretty JSON to a string buffer.