mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-19 01:15:21 +00:00
JSON doc
This commit is contained in:
parent
ae1c38f216
commit
496ac2fa9a
5 changed files with 66 additions and 1 deletions
|
|
@ -283,6 +283,22 @@ static void main_usage_data_format_examples(FILE* o, char* argv0) {
|
|||
" | 4,5,6 | Record 2: \"apple\" => \"4\", \"bat\" => \"5\", \"cog\" => \"6\"\n"
|
||||
" +---------------------+\n"
|
||||
"\n"
|
||||
" Tabular JSON: nested objects are supported, but arrays within them are not:\n"
|
||||
" +---------------------+\n"
|
||||
" | { |\n"
|
||||
" | \"apple\": 1, | Record 1: \"apple\" => \"1\", \"bat\" => \"2\", \"cog\" => \"3\"\n"
|
||||
" | \"bat\": 2, |\n"
|
||||
" | \"cog\": 3 |\n"
|
||||
" | } |\n"
|
||||
" | { |\n"
|
||||
" | \"dish\": { | Record 2: \"dish:egg\" => \"7\", \"dish:flint\" => \"8\", \"garlic\" => \"\"\n"
|
||||
" | \"egg\": 7, |\n"
|
||||
" | \"flint\": 8 |\n"
|
||||
" | }, |\n"
|
||||
" | \"garlic\": \"\" |\n"
|
||||
" | } |\n"
|
||||
" +---------------------+\n"
|
||||
"\n"
|
||||
" PPRINT: pretty-printed tabular\n"
|
||||
" +---------------------+\n"
|
||||
" | apple bat cog |\n"
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ TOP-OF-LIST DETAILS
|
|||
* JSON I/O:
|
||||
! string-preservation for doubles !
|
||||
! UT !
|
||||
! mlr --json reshape -i x,y -o item,value rec.json
|
||||
> mlr --json reshape -i x,y -o item,value rec.json
|
||||
! mld x several; also mlr -h output example
|
||||
|
||||
o wishlist: streamable version with fgetc rather than pointer-math.
|
||||
- on output, check 1st if mlhmmv is necessary? or just always?
|
||||
|
|
|
|||
|
|
@ -169,6 +169,22 @@ $ mlr --usage-data-format-examples
|
|||
| 4,5,6 | Record 2: "apple" => "4", "bat" => "5", "cog" => "6"
|
||||
+---------------------+
|
||||
|
||||
Tabular JSON: nested objects are supported, but arrays within them are not:
|
||||
+---------------------+
|
||||
| { |
|
||||
| "apple": 1, | Record 1: "apple" => "1", "bat" => "2", "cog" => "3"
|
||||
| "bat": 2, |
|
||||
| "cog": 3 |
|
||||
| } |
|
||||
| { |
|
||||
| "dish": { | Record 2: "dish:egg" => "7", "dish:flint" => "8", "garlic" => ""
|
||||
| "egg": 7, |
|
||||
| "flint": 8 |
|
||||
| }, |
|
||||
| "garlic": "" |
|
||||
| } |
|
||||
+---------------------+
|
||||
|
||||
PPRINT: pretty-printed tabular
|
||||
+---------------------+
|
||||
| apple bat cog |
|
||||
|
|
|
|||
|
|
@ -83,6 +83,22 @@ mlr stats2 -a linreg-pca -f u,v -g shape data/*
|
|||
| 4,5,6 | Record 2: "apple" => "4", "bat" => "5", "cog" => "6"
|
||||
+---------------------+
|
||||
|
||||
Tabular JSON: nested objects are supported, but arrays within them are not:
|
||||
+---------------------+
|
||||
| { |
|
||||
| "apple": 1, | Record 1: "apple" => "1", "bat" => "2", "cog" => "3"
|
||||
| "bat": 2, |
|
||||
| "cog": 3 |
|
||||
| } |
|
||||
| { |
|
||||
| "dish": { | Record 2: "dish:egg" => "7", "dish:flint" => "8", "garlic" => ""
|
||||
| "egg": 7, |
|
||||
| "flint": 8 |
|
||||
| }, |
|
||||
| "garlic": "" |
|
||||
| } |
|
||||
+---------------------+
|
||||
|
||||
PPRINT: pretty-printed tabular
|
||||
+---------------------+
|
||||
| apple bat cog |
|
||||
|
|
|
|||
|
|
@ -322,6 +322,22 @@ Data-format examples:
|
|||
| 4,5,6 | Record 2: "apple" => "4", "bat" => "5", "cog" => "6"
|
||||
+---------------------+
|
||||
|
||||
Tabular JSON: nested objects are supported, but arrays within them are not:
|
||||
+---------------------+
|
||||
| { |
|
||||
| "apple": 1, | Record 1: "apple" => "1", "bat" => "2", "cog" => "3"
|
||||
| "bat": 2, |
|
||||
| "cog": 3 |
|
||||
| } |
|
||||
| { |
|
||||
| "dish": { | Record 2: "dish:egg" => "7", "dish:flint" => "8", "garlic" => ""
|
||||
| "egg": 7, |
|
||||
| "flint": 8 |
|
||||
| }, |
|
||||
| "garlic": "" |
|
||||
| } |
|
||||
+---------------------+
|
||||
|
||||
PPRINT: pretty-printed tabular
|
||||
+---------------------+
|
||||
| apple bat cog |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue