Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Jsonnet - The data templating language
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Add std.reverse May 15, 2019
case_studies Fix typo in TEMPLATE (#505) Apr 25, 2018
cmd Fix cmake jsonnetfmt dependency May 20, 2019
core Fix warning (#653) May 15, 2019
cpp update bazel build to latest version of bazel May 15, 2019
doc Separate jsonnet fmt into its own executable. May 17, 2019
editors Remove Vim syntax file since it has been moved to google/vim-jsonnet.… Oct 1, 2015
examples Mixin example (#597) Jan 24, 2019
gc_stress Fix fmt tests Feb 24, 2018
include CMake: various improvements May 15, 2019
java_comparison New website Apr 14, 2018
perf_tests Add another realistic benchmark May 8, 2018
python Support for jpathdir in python bindings (#584) Dec 13, 2018
stdlib Also fix the e-324 divide by zero May 16, 2019
test_cmd Update tests for golang May 17, 2019
test_suite Update tests for golang May 17, 2019
third_party upgrading json.hpp to 3.6.1 May 21, 2019
tools don't use --livereload, it's not widely available yet May 15, 2019
vs2017 adding a VS2017 solution and adapting JsonnetJsonValue to be compatib… Aug 22, 2017
.clang-format Reformat code (and add make target to do so) Aug 2, 2017
.gitattributes Add reformatter, fix #73 Mar 1, 2016
.gitignore Separate jsonnet fmt into its own executable. May 17, 2019
.travis.yml std.parseJson - a builtin for parsing json (#553) Dec 13, 2018
CMakeLists.txt Separate jsonnet fmt into its own executable. May 17, 2019
CMakeLists.txt.in CMake build and test. (#303) Oct 11, 2017
CONTRIBUTING Update push_docs.sh to git clone with SSH. Update docs with new websi… Dec 16, 2015
Dockerfile Changed to use multi-stage docker build Jul 18, 2018
LICENSE Initial commit Aug 6, 2014
MANIFEST.in fix MANIFEST.in Dec 19, 2018
Makefile Separate jsonnet fmt into its own executable. May 17, 2019
README.md Separate jsonnet fmt into its own executable. May 17, 2019
WORKSPACE Bazel 0.25 update (#641) May 15, 2019
setup.py std.parseJson - a builtin for parsing json (#553) Dec 13, 2018
tests.sh Some UX improvements to commandline tool + cmdline tests Nov 4, 2017

README.md

Jsonnet - The data templating language

Build Status

For an introduction to Jsonnet and documentation, visit our website.

Visit our discussion forum.

Building Jsonnet

You can use either GCC or Clang to build Jsonnet. Note that on recent versions of macOS, /usr/bin/gcc and /usr/bin/g++ are actually Clang, so there is no difference.

Makefile

To build Jsonnet with GCC, run:

make

To build Jsonnet with Clang, run:

make CC=clang CXX=clang++

To run the output binary, run:

./jsonnet

To run the reformatter, run:

./jsonnetfmt

Bazel

Bazel builds are also supported. Install Bazel if it is not installed already. Then, run the following command to build with GCC:

bazel build -c opt //cmd:all

To build with Clang, use one of these two options:

env CC=clang CXX=clang++ bazel build -c opt //cmd:all

# OR

bazel build -c opt --action_env=CC=clang --action_env=CXX=clang++ //cmd:all

This builds the jsonnet and jsonnetfmt targets defined in cmd/BUILD. To launch the output binaries, run:

bazel-bin/cmd/jsonnet
bazel-bin/cmd/jsonnetfmt

Cmake

cmake . -Bbuild
cmake --build build --target run_tests

Contributing

See the contributing page on our website.

Developing Jsonnet

Running tests

To run the comprehensive suite:

make test

Locally serving the website

First, you need to build the JavaScript version of Jsonnet (which requires emscripten):

make doc/js/libjsonnet.js

Then, from the root of the repository you can generate and serve the website using Jekyll:

tools/scripts/serve_docs.sh

This should the website on localhost:8080, automatically rebuild when you change any underlying files, and automatically refresh your browser when that happens.

You can’t perform that action at this time.