Skip to main content

jcson - enhanced json for configuration

Project description

jcson - enhanced json for configuration

Build Status


The jcson python module is an enhanced json parser, that supports:

  • path expression subtitutions, with fallback to environment variables.
  • include directive
  • new line and inline comments

Path expression sustitutions

Substitutions are a way of referring to other parts of the configuration tree. The syntax is ${pathe.xpression} where the path.expression is used to write out a path through the object graph, like ${} that refers to { "foo": { "bar" : 42 } If a substitution is not present within a configuration tree, search will attempt to fallback to environment variables.

Include directive

An include directive consists of the unquoted string include followed by quoted filename.

include "include.jcson"


Install and update using pip:

pip install -U jcson

A simple example

Sample config file simple.jcson:

    "foo" : {
        "bar": "some value"

    "bar_value": "${}",

    "concatenated": "${} used later"

Pyhton code that reads it:

import json
import jcson

c ='simple.jcson')

print (json.dumps(c, indent=4))


    "foo" : {
        "bar": "some value"

    "bar_value": "some value",

    "concatenated": "some value used later"

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jcson-0.1.6.tar.gz (4.0 kB view hashes)

Uploaded source

Built Distribution

jcson-0.1.6-py3-none-any.whl (5.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page