mirror of
https://github.com/parsecsv/csv-spec.git
synced 2026-02-19 08:56:38 +00:00
Update type casting examples
This commit is contained in:
12
README.md
12
README.md
@@ -238,22 +238,22 @@ character used in any given input CSV-like formatted file/data.
|
||||
Input JSON:
|
||||
|
||||
```json
|
||||
[ [10, true, 0.3, "aaa"],
|
||||
[11, false, 2.13, "bbb"] ]
|
||||
[ [10, true, 0.3, null, "aaa"],
|
||||
[11, false, 2.13, "", "bbb"] ]
|
||||
```
|
||||
|
||||
Output CSV:
|
||||
|
||||
```csv
|
||||
10,true,0.3,aaa¬
|
||||
11,false,2.13,bbb¬
|
||||
10,true,0.3,,aaa¬
|
||||
11,false,2.13,,bbb¬
|
||||
```
|
||||
|
||||
Output CSV parsed back to JSON:
|
||||
|
||||
```json
|
||||
[ ["10", "true", "0.3", "aaa"],
|
||||
["11", "false", "2.13", "bbb"] ]
|
||||
[ ["10", "true", "0.3", "", "aaa"],
|
||||
["11", "false", "2.13", "", "bbb"] ]
|
||||
```
|
||||
|
||||
At this point it is up to the developer themselves to type cast the above
|
||||
|
||||
Reference in New Issue
Block a user