miller/docs
John Kerl 19e772d0e6 Add --infer-true/--infer-false for user-defined boolean strings (#1651)
By default Miller does not infer booleans from data files: "true" and
"false" (let alone "True", "yes", "on", etc.) are read as strings. This
adds opt-in flags letting users specify exactly which field values
should be inferred as boolean true/false when read from data files:

  mlr --infer-true True,yes,on --infer-false False,no,off ...

Details:

* Matching is exact and case-sensitive; unlisted values are unaffected.
* As with ints and floats, the original string representation is
  retained for non-JSON output, so CSV/TSV/etc. round-trip unchanged.
* JSON output emits canonical true/false (fixed marshalJSONBool to use
  the underlying boolean rather than the retained string, which would
  otherwise produce invalid JSON for e.g. "yes").
* Works with the -O and -A inference variants; -S (no inference)
  bypasses it, as it bypasses all other type inference.
* Works from .mlrrc as infer-true/infer-false, like any other flag.

Includes unit tests, regression-test cases under
test/cases/io-infer-flags/, and doc updates (reference-main-data-types,
regenerated flag list and man pages).

Addresses #1651.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 09:46:03 -04:00
..
overrides merge 2021-11-22 22:43:15 -05:00
src Add --infer-true/--infer-false for user-defined boolean strings (#1651) 2026-07-14 09:46:03 -04:00
_config.yml Set theme jekyll-theme-leap-day 2021-11-05 09:41:44 -04:00
build-epub.sh Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
Makefile Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
mkdocs.yml More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
README.md Page-refactor for CSV/JSON troubleshooting (#2128) 2026-07-03 10:19:09 -04:00
regen.sh Remove Miller-5 source/doc/manpage directories, along with C-build files (#731) 2021-11-04 00:45:44 -04:00
requirements.txt trying https://github.com/squidfunk/mkdocs-material/issues/43 2021-11-04 19:05:15 -04:00
retitle Remove Miller-5 source/doc/manpage directories, along with C-build files (#731) 2021-11-04 00:45:44 -04:00