New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

jsoncsv

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsoncsv

Standard for compressed JSON data, inspired by CSV


Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created

JSONCSV

Standard for compressed JSON data, inspired by CSV.

The most common format for REST clients to use to transmit data is JSON. It's human-readable, human-editable, and has implementations in multiple languages. The problem is it's rather verbose, especially in the fact you have to re-specify the keys for each object, even if they're the same. This doesnt make much difference for small datasets, but for larger datasets of the same object type, or where download time is a factor, data that doesnt need to be sent multiple times, shouldnt. That's where JSONCSV comes in.

Borrowing from a CSV concept, JSONCSV only requires the field names in full once. After that, fields just need to be in the same order as the fields to be the same order as the keys were defined. As it's all valid JSON, no extra steps are required to recieve the data, besides a client that will accept JSON. The only change will be to add a parser that will make the JSONCSV easier to interact with.

Example Structure

{
  "rows": [
    [1, "Jake", 19, true],
    [2, "Howard", 16, true]
  ],
  "columns": [
    "id", "name", "age", "is_nerd"
  ]
}

FAQs

Package last updated on 12 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts