Reputation: 9395
I'm kind of confused and was hoping one of you could give me some clarity. I am trying to get the best performance out of my Ajax request. The data coming across the wire is a 1,000 row 10 column table. The debate is: should I send Json or should I send Text? If I send Json, then doesn't that mean I have to include the column name for each item? Basically, the total size of the request will be increased by 10 x 1,000 in text inside the Json. Or, I can send a CSV across the wire and exclude the column names, thereby significantly reducing the size of the transfer. This has its own performance implications though, because then I have to parse the CSV on the client, rather than having it ready to go in Json. Thoughts anyone? Thanks
Upvotes: 2
Views: 517
Reputation: 2809
What about just sending array of arrays inside JSON object like this and you won't have to parse CSV
{data: [ [a, a , a] , [ b, b, b] ] }
Upvotes: 2