New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: unsupported format #36
Comments
Thank you for your report.
In this state, it is not a single table, so you can use the following command:
|
@uzimaru0000
This format is a valid format according to RFC 8259. I'm sorry that I'm not familiar with Since this CLI is a Format json into table view, using another formatter as a preprocessor means this CLI can't format correctly. Please do not misunderstand. I'm not blaming or any aggressive actions. Truly, I evaluate this CLI is so good. If I don't think so, I wouldn't raise an issue. ConclusionWhat I want to say can be summarized to the following. A formatting tool for a specific language is required to handle every format that is defined in the language's official document. SuggestionIt is a good idea to create a table, but regarding current situations of the IT industry, the Markdown table format will be appreciated. |
It means that the format as JSON is satisfied, but not as the format required by this CLI. |
Hi,
If that's the case, it is necessary to specify tv's requirements about the acceptable format. Currently, it's not written and the title is “Format json into table view.” Also, it is necessary to read your README by yourself from a point of view of someone who visited this repository for the first time. Then you will find that tv seems to accept all JSON files that satisfy RFC 8259. But, as an IT engineer with 33 years of experience, writing tv's requirements about the acceptable format means creating an escape route. If the tv is a formatting tool that shows a JSON file in a Table format, it is the developer's responsibility to handle JSON files in any valid format.
Don't ask your app's lack of implements to the one who raised this issue. If you are a professional engineer as you wrote in Zenn, you may be able to understand what it means. It means that your abdication of responsibility. I'm not accusing you, but advice from a well-experienced engineer. |
This tool is OSS, so if you have suggestions for improvements, create a PR! |
Caused by:
invalid type: map, expected a sequence at line 1 column 0
Suspicious reason
It seems to happen when returned JSON has no line breaks.
Experiments
According to Your page
The sample API provided in your article on Zenn
curl -s https://jsonplaceholder.typicode.com/users
curl -s https://jsonplaceholder.typicode.com/users | tv
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
|id|name |username |email |address|phone |website |company|
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
|1 |Leanne Graham |Bret |Sincere@april.biz |... |1-770-736-8031 x56442|hildegard.org|... |
|2 |Ervin Howell |Antonette |Shanna@melissa.tv |... |010-692-6593 x09125 |anastasia.net|... |
|3 |Clementine Bauch |Samantha |Nathan@yesenia.net |... |1-463-123-4447 |ramiro.info |... |
|4 |Patricia Lebsack |Karianne |Julianne.OConner@kory.org|... |493-170-9623 x156 |kale.biz |... |
|5 |Chelsey Dietrich |Kamren |Lucio_Hettinger@annie.ca |... |(254)954-1289 |demarco.info |... |
|6 |Mrs. Dennis Schulist |Leopoldo_Corkery|Karley_Dach@jasper.info |... |1-477-935-8478 x6430 |ola.org |... |
|7 |Kurtis Weissnat |Elwyn.Skiles |Telly.Hoeger@billy.biz |... |210.067.6132 |elvis.io |... |
|8 |Nicholas Runolfsdottir V|Maxime_Nienow |Sherwood@rosamond.me |... |586.493.6943 x140 |jacynthe.com |... |
|9 |Glenna Reichert |Delphine |Chaim_McDermott@dana.io |... |(775)976-6794 x41206 |conrad.com |... |
|10|Clementina DuBuque |Moriah.Stanton |Rey.Padberg@karina.biz |... |024-648-3804 |ambrose.net |... |
+--+------------------------+----------------+-------------------------+-------+---------------------+-------------+-------+
My target
When getting JSON from my target, Hymnary
curl "https://hymnary.org/api/scripture?book=Genesis&fromChapter=3&fromVerse=1&toChapter=3&toVerse=24"
curl -s "https://hymnary.org/api/scripture?book=Genesis&fromChapter=3&fromVerse=1&toChapter=3&toVerse=24" | tv -r
The text was updated successfully, but these errors were encountered: