简体   繁体   English

Json或CSV到具有大量数据的Web服务

[英]Json or CSV to web service with large amount of data

I have a list of objects that I send to web service. 我有要发送到Web服务的对象列表。
In csv it has 5kb and in JSon it has 15kb and this can be larger based on amount of data. 在csv中,它有5kb ;在JSon中,它有15kb ,根据数据量,它可能更大。
Because this is the first time that I send large amount of data to web service I need advice should I use JSon or CSV to send to ws? 因为这是我第一次将大量数据发送到Web服务,所以我需要建议我应该使用JSon还是CSV发送到ws?
What is the best practice? 最佳做法是什么?
I am most worried about performance. 我最担心表现。

Advantages: 好处:

JSON - easily interpreted on client side, compact notation, Hierarchical Data JSON-易于在客户端解释,紧凑的表示法,分层数据

CSV - Opens in Excel(?) CSV-在Excel中打开(?)

Disadvantages: 缺点:

JSON - If used improperly can pose a security hole (don't use eval), Not all languages have libraries to interpret it. JSON-如果使用不当会造成安全漏洞(请勿使用eval),并非所有语言都有库来解释它。

CSV - Does not support hierarchical data, you'd be the only one doing it, it's actually much harder than most devs think to parse valid csv files (CSV values can contain new lines as long as they are between quotes, etc). CSV-不支持分层数据,您将是唯一这样做的人,它实际上比大多数开发人员认为解析有效的csv文件要难得多(CSV值可以包含新行,只要它们位于引号之间,等等)。

For MoreDetail See this link. 有关更多详细信息,请参见此链接。

THis is the Link 这是链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM