- Read this in other languages: Español.
jdva
is an AWK library that offers functions to parse and create texts conform to the JSON grammar.
- A recent version of AWK.
Note:
For jdva
to work in Windows it is necessary to have AWK installed. Git provides AWK.
- Download the complete project writing:
$ git clone git://github.com/Qaracas/jdva.git
- Go to new created directory:
$ cd jdva
(jdva) $
- (Opcional) Set AWKPATH environment variable:
(jdva) $ export AWKPATH=${AWKPATH}:.:"$(pwd)""/src"
- (Optional) Run tests program:
(jdva) $ cd pruebas
(jdva/pruebas) $
(jdva/pruebas) $ ./haz_pruebas
- Copy
src/bbl_jdva.awk
andsrc/funcs_priv.awk
files into the/usr/local/share/awk
directory, or into any other directory listed in AWKPATH environment variable.
To access jdva
library functions from your AWK program, include the bbl_jdva.awk
file at the beginning.
#!/usr/bin/gawk -E
@include "bbl_jdva.awk"
BEGIN {
#...
}
Or pass it through the include source file command line option.
gawk -i bbl_jdva.awk '{#...}'
See README.tutorial.md for examples and README.functions.md for a complete list of library functions.
Take a look the ejemplos (examples) folder as well.
This library aims to conform with the JSON (JavaScript Object Notation) data exchange format defined in:
- Initial version - Qaracas
- List of contributors
This project is distributed under the terms of the GNU General Public License (GNU GPL v3.0). Look at the file LICENSE for more details.