TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Example of your favorite CSV Schema Documentation?

1 点作者 redlizard大约 2 年前
I&#x27;ve been working on an interface that accepts csv, and have been struggling to find good examples of services that have solid definitions of acceptable schema (column names, types, Required&#x2F;Optional&#x2F;Constriants).<p>I&#x27;d also be interested in examples that have documented nested arrays, nested objects, or nested object arrays in csv.<p>I&#x27;ve been thinking about it alot since openAPI&#x2F;GQL really do solve documentation, and can even autogen from views, but i haven&#x27;t found something similar for CSV.

2 条评论

redlizard大约 2 年前
Ok, after a decent amount of research all i can really find is: <a href="https:&#x2F;&#x2F;digital-preservation.github.io&#x2F;csv-schema&#x2F;#toc4" rel="nofollow">https:&#x2F;&#x2F;digital-preservation.github.io&#x2F;csv-schema&#x2F;#toc4</a><p>Not in love. Doesn&#x27;t really handle nested arrays&#x2F; objects. Also doesn&#x27;t generate human readable documentation.<p>Worried I may have to roll my own :(, but this feels like it is a solved problem.<p>Breaking it down into 3 sections:<p>1. Schema Definition 2. Documentation (Autogenerated from schema) 3. Deserialization that applies type constraints and validation<p>I&#x27;d be happy with the first 2 and to take care of deserialization myself. Something with all three rolled into one would be lovely.<p>The major requirement i haven&#x27;t been able to find support for are nested objects or arrays in a csv.<p>Example header: firstname, lastname, contact_0, contact_1, contact_2, address.address_1.1, address.address_2.1, address.zip.1, address.state.1, address.address_1.2, address.address_2.2, address.zip.2, address.state.2,
not_your_vase大约 2 年前
I don&#x27;t know about a lotbof CSV schema defs, but I found the column definitions in SQLLoader&#x27;s control files quite intuitive.