Skip to content

Instantly share code, notes, and snippets.

@ih2502mk
Last active August 29, 2015 14:05
Show Gist options
  • Save ih2502mk/45fa3dca5062d7b5f646 to your computer and use it in GitHub Desktop.
Save ih2502mk/45fa3dca5062d7b5f646 to your computer and use it in GitHub Desktop.
An idea for sending tabular data with less overhead both on amount of stuff to send and on amount of stuff to convert.

Tabular JSON

A transfer format that is a valid json but looks a lot like CSV and does not have overhead of sending repetitive parameter names.

{
  header: ["id", "username", "first_name", "last_name" ],
  data: [
    [1, "jsmith", "John", "Smith"],
    [2, "jdoe", "John", "Doe"],
    [3, "james.s", "James", "Smith"],
    [4, "janes", "Jane", "Smith"]
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment