Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions JsonPreprocessor/CJsonPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ class CSyntaxType():

class CPythonJSONDecoder(json.JSONDecoder):
"""
**Class: PythonJSONDecoder**

Add python data types and syntax to json. ``True``, ``False`` and ``None`` will be a accepted as json syntax elements.

**Args:**
Expand Down Expand Up @@ -127,8 +125,6 @@ def custom_scan_once(self, string : str, idx : int) -> any:

class CJsonPreprocessor():
"""
**Class: CJsonPreprocessor**

CJsonPreprocessor extends the syntax of json.

Features are
Expand Down Expand Up @@ -165,8 +161,6 @@ class CJsonPreprocessor():

def __init__(self, syntax: CSyntaxType = CSyntaxType.json , currentCfg : dict = {}) -> None:
"""
**Method: __init__**

Constructor

**Args:**
Expand All @@ -191,8 +185,6 @@ def __init__(self, syntax: CSyntaxType = CSyntaxType.json , currentCfg : dict =

def __sNormalizePath(self, sPath : str) -> str:
"""
**Method: __sNormalizePath**

Python struggles with

- UNC paths
Expand Down Expand Up @@ -255,8 +247,6 @@ def __mkslash(sPath : str) -> str:

def __processImportFiles(self, input_data : dict) -> dict:
'''
**Method: __processImportFiles**

This is a custom decorder of ``json.loads object_pairs_hook`` function.

This method helps to import json files which are provided in ``"[import]"`` keyword into the current json file.
Expand Down Expand Up @@ -297,8 +287,6 @@ def __processImportFiles(self, input_data : dict) -> dict:

def __load_and_removeComments(self, jsonFile : str) -> str:
"""
**Method: __load_and_removeComments**

Loads a given json file and filters all C/C++ style comments.

**Args:**
Expand Down Expand Up @@ -336,8 +324,6 @@ def replacer(match):

def __nestedParamHandler(self, sInputStr : str) -> str:
'''
**Method: __nestedParamHandler**

This method handles nested variables in parameter names or values. Variable syntax is ${Variable_Name}.

**Args:**
Expand Down Expand Up @@ -411,8 +397,6 @@ def __nestedParamHandler(self, sInputStr : str) -> str:

def __updateAndReplaceNestedParam(self, oJson : dict, recursive : bool = False):
'''
**Method: __updateAndReplaceNestedParam**

This method replaces all nested parameters in key and value of a json object .

**Args:**
Expand Down Expand Up @@ -531,7 +515,6 @@ def __tmpJsonUpdated(k, v, tmpJson, bNested):

def __checkAndUpdateKeyValue(self, sInputStr: str) -> str:
'''
**Method: jsonLoad**
This function checks and makes up all nested parameters in json configuration files.

**Args:**
Expand Down Expand Up @@ -562,8 +545,6 @@ def __checkAndUpdateKeyValue(self, sInputStr: str) -> str:

def jsonLoad(self, jFile : str, masterFile : bool = True):
'''
**Method: jsonLoad**

This function is the entry point of JsonPreprocessor.

It loads the json file, preprocesses it and returns the preprocessed result as data structure.
Expand Down