Catalog npm
PACKAGE EXPLORERView in registry

2json

npm

json flattener that outputs lines similar to xml2

json2xml2
Versions collected6
Direct dependencies2From release 0.2.1
Last observed20 Oct, 19:14 UTC

README

Current package documentation

json2

simple utility for transforming json documents into grep-able and sed-able lines

install

# json2 was already taken
npm install -g 2json

usage

# json2 args
json2 [file] [< or_file]

# 2json
# -p flag pretty prints json
2json [file] [< or_file] [-p --pretty]

# get package name
basename $(json2 package.json | grep '/name')

# change package name and reconvert lines to json using 2json
json2 < package.json | sed 's@\(/name\)/.*@\1/new-name@' | 2json -p

escapes for json2/2json

The following are escaped--by being in quote strings, as per rules:

  • all forward slashes (/)
  • all index brackets ([ or ])
  • all strings that are just number characters (e.g. 00193425)

You must escape double quotes in strings, json2 does this.

backslash escapes for 2json

The following characters must be escaped to handle issues with newlines using backslashes, whether in quotes or not:

\ <- escape as \\
\n
\r
\f

notes

/ [ ] are reserved by the json line grammar, if such values are found in your json, they will be quoted in double quotes.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 6

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.1Registry latest2 Dec 20162
0.2.0-readme12 Dec 20162
0.2.02 Dec 20162
0.1.01 Dec 20162
0.0.21 Dec 20162
0.0.11 Dec 20162

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
generalunrest/json2

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:14 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e3a638444c50208f8a37108bfa0a371e2857eb6e4f7faba069c223d5781d7dc3