Skip to main content

jcson - enhanced json for configuration

Build Status

Introdcution

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 ${foo.bar} 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"

Instaling

Install and update using pip:

pip install -U jcson

A simple example

Sample config file simple.jcson:

{
    "foo" : {
        "bar": "some value"
    },

    "bar_value": "${foo.bar}",

    "concatenated": "${foo.bar} used later"
}

Pyhton code that reads it:

import json
import jcson

c = jcson.read('simple.jcson')

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

Output:

{
    "foo" : {
        "bar": "some value"
    },

    "bar_value": "some value",

    "concatenated": "some value used later"
}

Metadata

Release files for jcson 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jcson 0.1.6
File Size Uploaded Provenance Actions
jcson-0.1.6.tar.gz 4.0 kB Without provenance Details for jcson-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jcson 0.1.6
File Interpreter ABI Platform Actions
jcson-0.1.6-py3-none-any.whl Python 3 none any Details for jcson-0.1.6-py3-none-any.whl

Total release size: 9.3 kB

Release files / jcson-0.1.6.tar.gz

Download URL jcson-0.1.6.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
30eed8f5ceb90d81b6af25310f2d70dbd7766c5a4eb6185825f5b32e2de42a8d
BLAKE2b-256 checksum
How to use checksums
6c51d5dc6cc9798a83fafe58baa72603fd96d048a102d14894565b3faa6f0ae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

Release files / jcson-0.1.6-py3-none-any.whl

Download URL jcson-0.1.6-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7dd6d7bada87ca00ffc5da1baa3d7d3850abfee928817bf955f9564dadb3100
BLAKE2b-256 checksum
How to use checksums
48abf6e32ba072d9a9632a8f6a55f9b4bcddb3bc82970e71b38aa44996d56798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

Security for jcson 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page