Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pyzenkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
Pyzenkit
Commits
cce31eea
Commit
cce31eea
authored
Jul 25, 2017
by
Honza Mach
Browse files
Options
Downloads
Patches
Plain Diff
Tweaked documentation of jsonconf.py module.
parent
07e3f038
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyzenkit/jsonconf.py
+7
-6
7 additions, 6 deletions
pyzenkit/jsonconf.py
with
7 additions
and
6 deletions
pyzenkit/jsonconf.py
+
7
−
6
View file @
cce31eea
...
@@ -3,18 +3,17 @@
...
@@ -3,18 +3,17 @@
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Copyright (C) since 2016 Jan Mach <honza.mach.ml@gmail.com>
# Copyright (C) since 2016 Jan Mach <honza.mach.ml@gmail.com>
# Use of this source is governed by the MIT license, see LICENSE file.
# Use of this source is governed by the MIT license, see LICENSE file.
#--------------
#--------------
-----------------------------------------------------------------
"""
"""
Implementation of JSON configuration handler.
This module provides following tools for manipulation with JSON configuration
files:
This module provides following tools and features:
* Simple writing of formated JSON configuration files
* Simple writing of formated JSON configuration files
* Simple reading of any JSON configuration files
* Simple reading of any JSON configuration files
* Reading and merging of multiple JSON configuration files/directories
* Reading and merging of multiple JSON configuration files/directories
* Support for comments in JSON files
* Support for
single line
comments in JSON files
(``#``,``//``)
* JSON schema validation
* JSON schema validation
"""
"""
...
@@ -129,7 +128,9 @@ def json_load(json_file):
...
@@ -129,7 +128,9 @@ def json_load(json_file):
"""
"""
Load contents of given JSON configuration file.
Load contents of given JSON configuration file.
The JSON syntax is enhanced with support for single line comments (
'
#
'
,
'
//
'
).
The JSON syntax is enhanced with support for single line comments (
'
#
'
,
'
//
'
),
but the parsing is really simple and the comment must be at the beginning of
the line (except for whitespaces).
:param str json_file: Name of the source JSON file.
:param str json_file: Name of the source JSON file.
:return: Loaded data structure.
:return: Loaded data structure.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment