diff --git a/docs/parsers/asciitable.md b/docs/parsers/asciitable.md index 7fd59e0c..c3c129b0 100644 --- a/docs/parsers/asciitable.md +++ b/docs/parsers/asciitable.md @@ -20,7 +20,7 @@ For example: │ hi there │ abc def │ 3.14 │ ╘══════════╧═════════╧════════╛ - or +or +-----------------------------+ | foo bar baz | @@ -29,30 +29,30 @@ For example: | hi there abc def 3.14 | +-----------------------------+ - or +or | foo | bar | baz | |----------|---------|--------| | good day | | 12345 | | hi there | abc def | 3.14 | - or +or foo bar baz --------- -------- ------ good day 12345 hi there abc def 3.14 - or +or foo bar baz good day 12345 hi there abc def 3.14 - etc... +etc... - Headers (keys) are converted to snake-case. All values are returned as - strings, except empty strings, which are converted to None/null. +Headers (keys) are converted to snake-case. All values are returned as +strings, except empty strings, which are converted to None/null. Usage (cli): diff --git a/docs/parsers/asciitable_m.md b/docs/parsers/asciitable_m.md index 90ae4774..be7076b6 100644 --- a/docs/parsers/asciitable_m.md +++ b/docs/parsers/asciitable_m.md @@ -23,7 +23,7 @@ For example: ╘══════════╧═════════╧════════╛ Cells with multiple lines within rows will be joined with a newline -character ('\n'). +character ('\\n'). Headers (keys) are converted to snake-case and newlines between multi-line headers are joined with an underscore. All values are returned as strings, @@ -62,7 +62,7 @@ Examples: > +==========+=========+========+' | jc --asciitable-m -p [ { - "foo": "good day\nmate", + "foo": "good day\\nmate", "bar": "12345", "baz_buz": null }, @@ -86,7 +86,7 @@ Examples: > ╘══════════╧═════════╧════════╛' | jc --asciitable-m -p [ { - "foo": "good day\nmate", + "foo": "good day\\nmate", "bar": "12345", "baz_buz": null }, diff --git a/jc/parsers/asciitable.py b/jc/parsers/asciitable.py index 52881c01..339329bb 100644 --- a/jc/parsers/asciitable.py +++ b/jc/parsers/asciitable.py @@ -15,7 +15,7 @@ For example: │ hi there │ abc def │ 3.14 │ ╘══════════╧═════════╧════════╛ - or +or +-----------------------------+ | foo bar baz | @@ -24,30 +24,30 @@ For example: | hi there abc def 3.14 | +-----------------------------+ - or +or | foo | bar | baz | |----------|---------|--------| | good day | | 12345 | | hi there | abc def | 3.14 | - or +or foo bar baz --------- -------- ------ good day 12345 hi there abc def 3.14 - or +or foo bar baz good day 12345 hi there abc def 3.14 - etc... +etc... - Headers (keys) are converted to snake-case. All values are returned as - strings, except empty strings, which are converted to None/null. +Headers (keys) are converted to snake-case. All values are returned as +strings, except empty strings, which are converted to None/null. Usage (cli): diff --git a/jc/parsers/asciitable_m.py b/jc/parsers/asciitable_m.py index 8ff3eed1..17d40a6f 100644 --- a/jc/parsers/asciitable_m.py +++ b/jc/parsers/asciitable_m.py @@ -18,7 +18,7 @@ For example: ╘══════════╧═════════╧════════╛ Cells with multiple lines within rows will be joined with a newline -character ('\n'). +character ('\\n'). Headers (keys) are converted to snake-case and newlines between multi-line headers are joined with an underscore. All values are returned as strings, @@ -57,7 +57,7 @@ Examples: > +==========+=========+========+' | jc --asciitable-m -p [ { - "foo": "good day\nmate", + "foo": "good day\\nmate", "bar": "12345", "baz_buz": null }, @@ -81,7 +81,7 @@ Examples: > ╘══════════╧═════════╧════════╛' | jc --asciitable-m -p [ { - "foo": "good day\nmate", + "foo": "good day\\nmate", "bar": "12345", "baz_buz": null },