JSON-TO-DHALL(1)
π JSON-TO-DHALL(1) π
okay so bestie, welcome to the json-to-dhall manual β it lives in section 1 of the User Commands manual set, and it's genuinely one of my faves. it's version 1.7.12, and yes we're gonna walk through every single flag, no skipping, no "you get the idea" nonsense. we don't do that here. π«Ά
β¨ NAME β¨
json-to-dhall β manual page for json-to-dhall 1.7.12
like, that's the whole name section. short and iconic. π
π¦ SYNOPSIS π¦
json-to-dhall [type | [SCHEMA] [--records-strict | --records-loose]
[--no-keyval-arrays] [--no-keyval-maps]
[--unions-first | --unions-none | --unions-strict]
[--omissible-lists] [--file FILE] [--output FILE] [--ascii]
[--plain] | (-V|--version)]
ngl the synopsis is giving "my brain at 3am" energy, but we keep it exactly as it is because it's load-bearing. π
πΈ DESCRIPTION πΈ
Convert a JSON expression to a Dhall expression, given the expected Dhall type.
that's it. that's the whole job. JSON goes in, Dhall comes out, and you look like a genius. main character energy fr. π₯
π AVAILABLE OPTIONS π
okay here's the full menu, every last one of them:
-h,--helpβ shows you this very help text. your little map when you're lost. πΊοΈSCHEMAβ this is the Dhall type (the schema). here's the slay part: you can omit the schema and let the executable infer the schema from the JSON value itself. it literally just knows. πβ¨--records-strictβ fail if any JSON fields are missing from the expected Dhall type. no wiggle room, no forgiveness. strict means strict. π--records-looseβ tolerate JSON fields that aren't present within the expected Dhall type. chill mode activated. π--no-keyval-arraysβ disable conversion of key-value arrays to records. turn that feature off. π--no-keyval-mapsβ disable conversion of homogeneous map objects to association lists. also off. bye. π--unions-firstβ the first value with the matching type (successfully parsed all the way down the tree) is accepted, even if it's not the only possible match. this one is the DEFAULT. β--unions-noneβ unions not allowed. periodt. π«--unions-strictβ error if more than one union value matches the type (and parses successfully). picky in the best way. π--omissible-listsβ tolerate missing list values, they are assumed empty. no list? cool, it's[]now. π--file FILEβ read JSON from a file instead of standard input. in comes the file. π--output FILEβ write the Dhall expression to a file instead of standard output. out goes the file. πΎ--asciiβ format code using only ASCII syntax. no fancy glyphs, just the classics. π€--plainβ disable syntax highlighting. sometimes you just want it raw. π-V,--versionβ display version. flex the number. π·οΈ
π AVAILABLE COMMANDS π
typeβ output the inferred Dhall type from a JSON value. so instead of converting the whole thing, you just get the type. lowkey so useful. iykyk. π§
π quick reminder bestie: --unions-first is the DEFAULT, so if you don't pick any union flag at all, that's the vibe you're getting. no cap.
that's the whole page!! every flag, every default, every warning, all present and accounted for. go forth and convert. π
json-to-dhall 1.7.12 β July 2024 β and that's the JSON-TO-DHALL(1) footer, folded up all cute into this lil sign-off. mwah. πβ¨
π¦ where this page comes from
- epel 10: dhall-json 1.7.12-1.el10_0 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms