javascript - How to pass a header once when sending a list of JSON objects? -


i'm passing list of json objects client server. there way or standard send headers once instead of passing in each json object (more csv style pass header , list of objects containing content only)?

for example:

{ "employees": [ { "firstname":"john" , "lastname":"doe" },  { "firstname":"anna" , "lastname":"smith" },  { "firstname":"peter" , "lastname":"jones" } ] } 

if have 10,000 employees pass, repeating each time headers ("fisrtname" , "lastname") wasteful.

you can create array of firstname , lastname , pass data this,

{     "employees": {         "firstname" : ["john", "anna", "peter"],         "lastname" : ["doe", "smith", "jones"]     } } 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -