cgi-fr / jsonline Goto Github PK
View Code? Open in Web Editor NEWJSONLine data container with command line utility.
License: GNU General Public License v3.0
JSONLine data container with command line utility.
License: GNU General Public License v3.0
Has(key string) bool
Len() int
value, exists := row.GetFromPath("pimo.style.path")
row.SetAtPath("pimo.style.path", value)
we can't use jl
command to normalize a json stream with only wanted fields.
$ jl -t '{"name": "string"}' <<EOF
{"name": "Martin", "city": "London"}
EOF
{"name":"Martin","city":"London"}
Add --strict
flag (-s
for short) to filter out not declared fields.
$ jl --strict -t '{"name": "string"}' <<EOF
{"name": "Martin", "city": "London"}
EOF
{"name":"Martin"}
With this input JSON document
{
"designation": "Acme Inc.",
"adresseSiègeSocial": {
"NumeroRue": "123",
"NomRue": "Main St.",
"CodePostal": "12345",
"Ville": "Anytown"
},
"employe": [
{
"Nom": "Jane",
"Prenom": "Doe",
"dateNaissance": "01-01-1970",
"LieuNaissance": "Anytown",
"NombreEnfants": 1,
"enfant": [
{
"Prenom": "John",
"DateNaissance": "01-01-2000",
"LieuNaissance": "Anytown"
},
{
"Prenom": "Jack",
"DateNaissance": "01-01-2002",
"LieuNaissance": "Anytown"
}
]
}
]
}
FindValuesAtPath("employe.enfant")
should return
[
[
{
"Prenom": "John",
"DateNaissance": "01-01-2000",
"LieuNaissance": "Anytown"
},
{
"Prenom": "Jack",
"DateNaissance": "01-01-2002",
"LieuNaissance": "Anytown"
}
]
]
FindValuesAtPath("employe.enfant.*")
should return
[
{
"Prenom": "John",
"DateNaissance": "01-01-2000",
"LieuNaissance": "Anytown"
},
{
"Prenom": "Jack",
"DateNaissance": "01-01-2002",
"LieuNaissance": "Anytown"
}
]
Column definition in database have a max size definition. Trying to insert a bigger value with lino push
failed.
Define a template with max size parameter that truncate string longer than max size definition.
$ jl -t '{"name": "string(4)"}' <<EOF
{"name": "Martin"}
EOF
{"name":"Mart"}
see: ohler55/ojg#124
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.