JSON-TO-DHALL(1)

πŸ“¦
version 1.7.12 Β· 3 versions
, in epel 10

πŸ’– 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