nodesocket / jsonlite Goto Github PK
View Code? Open in Web Editor NEWA simple, self-contained, serverless, zero-configuration, json document store.
License: Apache License 2.0
A simple, self-contained, serverless, zero-configuration, json document store.
License: Apache License 2.0
Instead of having nested objects inside each JSON file, have plain JSON objects inside each of them and reference to other files by their UUID. This would also allow to use hashes to identify each object and have automatic deduplication.
Guard against potentially harmful or unexpected inputs. See:
https://github.com/nodesocket/jsonlite/blob/master/jsonlite#L43
https://github.com/nodesocket/jsonlite/blob/master/jsonlite#L60
https://github.com/nodesocket/jsonlite/blob/master/jsonlite#L69
it's a great idea & tool you've come up with, esp. if i'm using Shell; but would it be possible to make a programmatic interface for co-workers more well-versed in, say, Python/Java? thanks
Is uuidgen
portable across most distributions? Is there a better option?
See: https://github.com/nodesocket/jsonlite/blob/master/jsonlite.bash#L71
Shard document id's by the first character into one-level deep subdirectories. This feature also bumps the major version to 2.0.0
.
Requires updating README.md
, CHANGELOG.md
, and adding new specific tests for this case as well.
Mitigates filesystem limits on the number of files in a single directory by a factor of 16 since we are sharding by the first character only.
jsonlite
still can read databases that don't use sharding without significant performance degradation.set
, get
, count
, delete
.How to support piping into set?
echo "{}" | jsonlite set
When running drop
do we need to protect against malicious or inadvertent input? This is especially scary stuff since we run rm -rf
.
See: https://github.com/nodesocket/jsonlite/blob/master/jsonlite.bash#L140 and https://github.com/nodesocket/jsonlite/blob/master/jsonlite.bash#L147.
I just started a Rust implementation and I was looking for exit codes to return on error, and I saw that you are using codes from 1 to 4. Wouldn't it be better to normalize those codes, avoiding 1 and 2 as 1 is for general errors and 2 is for builtins incorrect usage (see https://www.gnu.org/software/bash/manual/bash.html#Exit-Status and http://tldp.org/LDP/abs/html/exitcodes.html).
this project will be support to "another" languages like php, javascript(nodejs), python e similars?
i created a version using php. (https://github.com/wallacesilva/phpjsonlite)
i loved this project ❤️
Piping to python -m json.tool
to pretty print json is super expensive. Is there a better option? Is a native bash implementation even possible?
See: https://github.com/nodesocket/jsonlite/blob/master/jsonlite.sh#L34
Add the ability to provide a custom document id (aka key) to set
using a new command specific option --key
. This feature also bumps the major version to 2.0.0
.
Any security implications? Make sure not able to override files outside of $JSONLITE_DATA_DIR
.
Requires updating README.md, CHANGELOG.md, and adding new specific tests for this case as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.