diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index af941ad6..6d654940 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,13 +14,13 @@ ################################################################################# # # File: JsonPreprocessor.py -# -# This module uses to handle connfiguration file in json format (import another +# +# This module uses to handle connfiguration file in json format (import another # json file to the json file). # Allows user adds comment into json config file # # History: -# +# # 2021-01: # - Initially created by Mai Dinh Nam Son (RBVH/ECM11) # @@ -30,7 +30,7 @@ # - Avoid cyclic import # # 2021-02-17: -# - Replace method to load json data json.load() by json.loads() +# - Replace method to load json data json.load() by json.loads() # to load string data after removing comment(s) # # 2021-02-18: @@ -57,7 +57,7 @@ class CSyntaxType(): json = "json" class CPythonJSONDecoder(json.JSONDecoder): - """ + """ Add python data types and syntax to json. ``True``, ``False`` and ``None`` will be a accepted as json syntax elements. **Args:** @@ -71,9 +71,9 @@ class CPythonJSONDecoder(json.JSONDecoder): r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.scan_once = self.custom_scan_once + self.scan_once = self.custom_scan_once def _custom_scan_once(self, string :str, idx: int) -> any: try: @@ -145,15 +145,15 @@ class CJsonPreprocessor(): * Example: .. code:: - + { "basenode" : { subnode : { "myparam" : 5 }, - + }, - + "myVar" : ${basenode.subnode.myparam} } @@ -183,7 +183,7 @@ def __init__(self, syntax: CSyntaxType = CSyntaxType.json , currentCfg : dict = self.lUpdatedParams = {} self.lNestedParams = [] self.lDotInParamName = [] - + def __sNormalizePath(self, sPath : str) -> str: """ Python struggles with @@ -196,10 +196,10 @@ def __sNormalizePath(self, sPath : str) -> str: e.g. ``c:\autotest\tuner \t`` will be interpreted as tab, the result after processing it with an regexp would be ``c:\autotest uner`` - + In order to solve this problems any slash will be replaced from backslash to slash, only the two UNC backslashes must be kept if contained. - + **Args:** **sPath** (*string*) @@ -212,22 +212,22 @@ def __sNormalizePath(self, sPath : str) -> str: **sPath** (*string*) - Normalized path as string - """ + Normalized path as string + """ # make all backslashes to slash, but mask # UNC indicator \\ before and restore after. def __mkslash(sPath : str) -> str: if sPath.strip()=='': return '' - + sNPath=re.sub(r"\\\\",r"#!#!#",sPath.strip()) sNPath=re.sub(r"\\",r"/",sNPath) sNPath=re.sub(r"#!#!#",r"\\\\",sNPath) - - return sNPath + + return sNPath if sPath.strip()=='': return '' - + # TML Syntax uses %Name%-syntax to reference an system- or framework # environment variable. Linux requires ${Name} to do the same. # Therefore change on Linux systems to ${Name}-syntax to make @@ -235,22 +235,22 @@ def __mkslash(sPath : str) -> str: # This makes same TML code working on both platforms if platform.system().lower()!="windows": sPath=re.sub("%(.*?)%","${\\1}",sPath) - + #in a windows system normpath turns all slashes to backslash #this is unwanted. Therefore turn back after normpath execution. sNPath=os.path.normpath(os.path.expandvars(sPath.strip())) #make all backslashes to slash, but mask #UNC indicator \\ before and restore after. sNPath=__mkslash(sNPath) - - return sNPath + + return sNPath def __processImportFiles(self, input_data : dict) -> dict: ''' 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. + + This method helps to import json files which are provided in ``"[import]"`` keyword into the current json file. **Args:** @@ -269,7 +269,7 @@ def __processImportFiles(self, input_data : dict) -> dict: for key, value in input_data: if re.match('^\s*\[\s*import\s*\]\s*', key.lower()): abs_path_file = os.path.abspath(value) - + # Use recursive_level and lImportedFiles to avoid cyclic import self.recursive_level = self.recursive_level + 1 # increase recursive level @@ -277,7 +277,7 @@ def __processImportFiles(self, input_data : dict) -> dict: self.lImportedFiles = self.lImportedFiles[:self.recursive_level] if abs_path_file in self.lImportedFiles: raise Exception(f"Cyclic imported json file '{abs_path_file}'!") - + oJsonImport = self.jsonLoad(abs_path_file, masterFile=False) tmpOutdict = copy.deepcopy(out_dict) for k1, v1 in tmpOutdict.items(): @@ -305,42 +305,42 @@ def __load_and_removeComments(self, jsonFile : str) -> str: **jsonFile** (*string*) - Path (absolute/relative/) file to be processed. - The path can contain windows/linux style environment variables. + Path (absolute/relative/) file to be processed. + The path can contain windows/linux style environment variables. !ATTENTION! This is dangerous - + **Returns:** **sContentCleaned** (*string*) String version of json file after removing all comments. """ - + def replacer(match): s = match.group(0) if s.startswith('/'): - return "" + return "" else: return s - + file=open(jsonFile, mode='r', encoding='utf-8') sContent=file.read() file.close() pattern = re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE) - sContentCleaned=re.sub(pattern, replacer, sContent) + sContentCleaned=re.sub(pattern, replacer, sContent) return sContentCleaned - + def __nestedParamHandler(self, sInputStr : str) -> str: ''' This method handles nested variables in parameter names or values. Variable syntax is ${Variable_Name}. - + **Args:** - **sInputStr** (*string*) + **sInputStr** (*string*) Parameter name or value which contains a nested variable. @@ -348,9 +348,9 @@ def __nestedParamHandler(self, sInputStr : str) -> str: **sStrHandled** (*string*) - String which contains the resolved variable. + String which contains the resolved variable. ''' - + referVars = re.findall('(\${\s*.*?\s*})', sInputStr) if len(referVars) > 1: sUpdateVar = referVars[0] @@ -389,7 +389,7 @@ def __nestedParamHandler(self, sInputStr : str) -> str: re.sub('\\' + pattern, '\'' + str(tmpValue) + '\'', sInputStr) sStrHandled = sUpdateVar + sInputStr return sStrHandled - + else: if "." in referVars[0]: dotdictVariable = re.sub('\${\s*(.*?)\s*}', '\\1', referVars[0]) @@ -454,7 +454,7 @@ def __handleDotdictFormat(self, lInputListParams : list, lParams: list = []) -> if lInputListParams == []: return lParams else: - return self.__handleDotdictFormat(lInputListParams, lParams) + return self.__handleDotdictFormat(lInputListParams, lParams) def __updateAndReplaceNestedParam(self, oJson : dict, bNested : bool = False, recursive : bool = False): ''' @@ -464,7 +464,7 @@ def __updateAndReplaceNestedParam(self, oJson : dict, bNested : bool = False, re **oJson** (*dict*) - Input Json object as dictionary. This dictionary will be searched for all ``${variable}`` occurences. + Input Json object as dictionary. This dictionary will be searched for all ``${variable}`` occurences. If found it will be replaced with it's current value. **Returns:** @@ -483,7 +483,7 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): exec(sExec, globals()) except: raise Exception(f"Could not set variable '{k}' with value '{v}'!") - + if isinstance(v, str): sExec = "oJson['" + k.split('[', 1)[0] + "'][" + k.split('[', 1)[1] + " = \"" + v + "\"" else: @@ -494,7 +494,7 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): pass else: oJson[k] = v - + else: if bNested: oJson[k] = v @@ -503,7 +503,7 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): if bool(self.currentCfg) and not recursive: for k, v in self.currentCfg.items(): globals().update({k:v}) - + tmpJson = copy.deepcopy(oJson) for k, v in tmpJson.items(): keyNested = '' @@ -513,7 +513,7 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): k = re.sub("str\(\s*(\${.+)\s*\)", "\\1", k) keyAfterProcessed = self.__nestedParamHandler(k) k = re.sub('^\s*\${\s*(.*?)\s*}', '\\1', keyAfterProcessed) - + if isinstance(v, dict): v, bNested = self.__updateAndReplaceNestedParam(v, bNested, recursive=True) @@ -542,7 +542,7 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): tmpValue.append(item) v = tmpValue - + elif isinstance(v, str): if re.match('^.*\s*\${\s*', v.lower()): bStringValue = False @@ -563,10 +563,10 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): v = ldict['value'] except: raise Exception(f"The variable '{valueAfterProcessed}' is not available!") - + if isinstance(v, str) and re.match('^\s*none|true|false\s*$', v.lower()): v = '\"' + v + '\"' - + __jsonUpdated(k, v, oJson, bNested, keyNested) if keyNested != '': self.lUpdatedParams.update({k:v}) @@ -584,8 +584,8 @@ def __checkAndUpdateKeyValue(self, sInputStr: str) -> str: **Returns:** The string after nested parameters are made up. - Ex: - + Ex: + Nested param ${abc}['xyz'] -> "${abc}['xyz']" Nested param "${abc}['xyz']" -> "str(${abc}['xyz'])" @@ -624,7 +624,7 @@ def jsonLoad(self, jFile : str, masterFile : bool = True): ''' This function is the entry point of JsonPreprocessor. - It loads the json file, preprocesses it and returns the preprocessed result as data structure. + It loads the json file, preprocesses it and returns the preprocessed result as data structure. **Args:** @@ -638,7 +638,7 @@ def jsonLoad(self, jFile : str, masterFile : bool = True): **oJson** (*dict*) - Preprocessed json file(s) as dictionary data structure + Preprocessed json file(s) as dictionary data structure ''' def __handleStrNoneTrueFalse(objJson): oJson = {} @@ -659,10 +659,10 @@ def __handleStrNoneTrueFalse(objJson): jFile=self.__sNormalizePath(os.path.dirname(sys.argv[0])+"/"+jFile) if not(os.path.isfile(jFile)): - raise Exception(f"File '{jFile}' is not existing!") + raise Exception(f"File '{jFile}' is not existing!") self.lImportedFiles.append(os.path.abspath(jFile)) - (jsonPath,tail)=os.path.split(jFile) + (jsonPath,tail)=os.path.split(jFile) try: sJsonData= self.__load_and_removeComments(os.path.abspath(jFile)) @@ -724,13 +724,13 @@ def __handleStrNoneTrueFalse(objJson): raise Exception(f"Provided syntax '{self.syntax}' is not supported.") try: - oJson = json.loads(sJsonDataUpdated, - cls=CJSONDecoder, + oJson = json.loads(sJsonDataUpdated, + cls=CJSONDecoder, object_pairs_hook=self.__processImportFiles) except Exception as error: raise Exception(f"json file '{jFile}': '{error}'") - oJson = __handleStrNoneTrueFalse(oJson) + oJson = __handleStrNoneTrueFalse(oJson) os.chdir(currentDir) self.__checkDotInParamName(oJson) @@ -754,7 +754,7 @@ def __handleStrNoneTrueFalse(objJson): exec(sExec) except: pass - + # Checking availability of nested parameters before updating and replacing. for param in self.lNestedParams: parseNestedParam = self.__nestedParamHandler(param) @@ -765,6 +765,6 @@ def __handleStrNoneTrueFalse(objJson): ldict = {} exec(sExec, globals(), ldict) except: - raise Exception(f"The variable '{parseNestedParam}' is not available!") - - return oJson \ No newline at end of file + raise Exception(f"The variable '{parseNestedParam}' is not available!") + + return oJson diff --git a/JsonPreprocessor/JsonPreprocessor.pdf b/JsonPreprocessor/JsonPreprocessor.pdf index ad167d91..9989dc3f 100644 Binary files a/JsonPreprocessor/JsonPreprocessor.pdf and b/JsonPreprocessor/JsonPreprocessor.pdf differ diff --git a/JsonPreprocessor/__init__.py b/JsonPreprocessor/__init__.py index d897a8bb..21f38dba 100644 --- a/JsonPreprocessor/__init__.py +++ b/JsonPreprocessor/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/JsonPreprocessor/version.py b/JsonPreprocessor/version.py index f59330ca..91e8e3c7 100644 --- a/JsonPreprocessor/version.py +++ b/JsonPreprocessor/version.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index c6e4928c..93a56352 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ please don\'t hesitate to raise a ticket. ## License -Copyright 2020-2022 Robert Bosch GmbH +Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may diff --git a/README.rst b/README.rst index c7058716..e770df11 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2020-2022 Robert Bosch GmbH +.. Copyright 2020-2023 Robert Bosch GmbH .. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ Json Preprocessor's Package Description Getting Started --------------- -The **JsonPreprocessor** is a Python3 package which allows programmers to handle +The **JsonPreprocessor** is a Python3 package which allows programmers to handle additional features in JSON files such as * add comments @@ -94,9 +94,9 @@ A detailed documentation of the Json Preprocessor's package can be found here: ` Feedback -------- -To give us a feedback, you can send an email to `Thomas Pollerspöck `_ +To give us a feedback, you can send an email to `Thomas Pollerspöck `_ -In case you want to report a bug or request any interesting feature, please don't +In case you want to report a bug or request any interesting feature, please don't hesitate to raise a ticket. Maintainers @@ -114,7 +114,7 @@ Contributors License ------- -Copyright 2020-2022 Robert Bosch GmbH +Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/additions/CExtendedSetup.py b/additions/CExtendedSetup.py index 00d770da..fb68aeaf 100644 --- a/additions/CExtendedSetup.py +++ b/additions/CExtendedSetup.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/additions/__init__.py b/additions/__init__.py index 85a18b76..2a9f03ef 100644 --- a/additions/__init__.py +++ b/additions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/atest/executepytest.py b/atest/executepytest.py index b6e3f03a..2575a7de 100644 --- a/atest/executepytest.py +++ b/atest/executepytest.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/atest/jsonpreprocessor/test_jsonpreprocessor.py b/atest/jsonpreprocessor/test_jsonpreprocessor.py index d8dbadf1..47b942ed 100644 --- a/atest/jsonpreprocessor/test_jsonpreprocessor.py +++ b/atest/jsonpreprocessor/test_jsonpreprocessor.py @@ -529,4 +529,4 @@ def test_dotdict_format_in_value_04(self): oJsonPreprocessor = CJsonPreprocessor(syntax="python") oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) assert oJsonData['params']['global']['gPrepro.Float.Param'] == 1 - assert oJsonData['params']['global']['gPrepro.Structure']['test.Structure'] == "Structure test" \ No newline at end of file + assert oJsonData['params']['global']['gPrepro.Structure']['test.Structure'] == "Structure test" diff --git a/atest/run.bat b/atest/run.bat index 88d7f8c5..865bce94 100644 --- a/atest/run.bat +++ b/atest/run.bat @@ -1,4 +1,4 @@ -:: Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +:: Copyright 2020-2023 Robert Bosch GmbH :: :: Licensed under the Apache License, Version 2.0 (the "License"); :: you may not use this file except in compliance with the License. @@ -21,4 +21,4 @@ cd %~dp0\jsonpreprocessor ) || ( echo Run JsonPreprocessor acceptance test failed! ) -cd %current_dir% \ No newline at end of file +cd %current_dir% diff --git a/atest/testdata/config/01_proper_json/proper_file_config.json b/atest/testdata/config/01_proper_json/proper_file_config.json index 4762893c..5db527de 100644 --- a/atest/testdata/config/01_proper_json/proper_file_config.json +++ b/atest/testdata/config/01_proper_json/proper_file_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,4 +23,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_01.json b/atest/testdata/config/02_import_json/import_file_utf8_format_01.json index ddf84ef7..1d0c2a7b 100644 --- a/atest/testdata/config/02_import_json/import_file_utf8_format_01.json +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_02.json b/atest/testdata/config/02_import_json/import_file_utf8_format_02.json index 470ce24d..1827c2c5 100644 --- a/atest/testdata/config/02_import_json/import_file_utf8_format_02.json +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,4 +27,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_03.json b/atest/testdata/config/02_import_json/import_file_utf8_format_03.json index 224497fb..9c4fc515 100644 --- a/atest/testdata/config/02_import_json/import_file_utf8_format_03.json +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,4 +27,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_04.json b/atest/testdata/config/02_import_json/import_file_utf8_format_04.json index 1d684084..5a4f4ef8 100644 --- a/atest/testdata/config/02_import_json/import_file_utf8_format_04.json +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_04.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,4 +30,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/utf8_format_data_02.json" - } \ No newline at end of file + } diff --git a/atest/testdata/config/02_import_json/import_files01_config.json b/atest/testdata/config/02_import_json/import_files01_config.json index 9e7f6995..9ed94c78 100644 --- a/atest/testdata/config/02_import_json/import_files01_config.json +++ b/atest/testdata/config/02_import_json/import_files01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" - } \ No newline at end of file + } diff --git a/atest/testdata/config/02_import_json/import_files02_config.json b/atest/testdata/config/02_import_json/import_files02_config.json index b0e971a9..8786b6ce 100644 --- a/atest/testdata/config/02_import_json/import_files02_config.json +++ b/atest/testdata/config/02_import_json/import_files02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/imported_file02_config.json" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_files03_config.json b/atest/testdata/config/02_import_json/import_files03_config.json index 5ca036c4..c715cb6a 100644 --- a/atest/testdata/config/02_import_json/import_files03_config.json +++ b/atest/testdata/config/02_import_json/import_files03_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_files04_config.json b/atest/testdata/config/02_import_json/import_files04_config.json index 53b4da3c..ef136839 100644 --- a/atest/testdata/config/02_import_json/import_files04_config.json +++ b/atest/testdata/config/02_import_json/import_files04_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ "[import]": "../import/imported_file02_config.json" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_one_file01_config.json b/atest/testdata/config/02_import_json/import_one_file01_config.json index e68e98fe..c4fe810a 100644 --- a/atest/testdata/config/02_import_json/import_one_file01_config.json +++ b/atest/testdata/config/02_import_json/import_one_file01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_one_file02_config.json b/atest/testdata/config/02_import_json/import_one_file02_config.json index 8282f130..9d3e9151 100644 --- a/atest/testdata/config/02_import_json/import_one_file02_config.json +++ b/atest/testdata/config/02_import_json/import_one_file02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_one_file03_config.json b/atest/testdata/config/02_import_json/import_one_file03_config.json index b5f0fde5..55597f86 100644 --- a/atest/testdata/config/02_import_json/import_one_file03_config.json +++ b/atest/testdata/config/02_import_json/import_one_file03_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/imported_file01_config.json" -} \ No newline at end of file +} diff --git a/atest/testdata/config/02_import_json/import_one_file04_config.json b/atest/testdata/config/02_import_json/import_one_file04_config.json index 9514a7d5..f8ef4be0 100644 --- a/atest/testdata/config/02_import_json/import_one_file04_config.json +++ b/atest/testdata/config/02_import_json/import_one_file04_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ { "Project": "JsonPreprocessor", "WelcomeString": "Hello... JsonPreprocessor selftest is running now!", - + // Version control information. "version": { "majorversion": "0", @@ -25,4 +25,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import01_config.json b/atest/testdata/config/03_nested_import/nested_import01_config.json index f2ac4e11..3238c868 100644 --- a/atest/testdata/config/03_nested_import/nested_import01_config.json +++ b/atest/testdata/config/03_nested_import/nested_import01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import02_config.json b/atest/testdata/config/03_nested_import/nested_import02_config.json index fbf28045..832e5b2f 100644 --- a/atest/testdata/config/03_nested_import/nested_import02_config.json +++ b/atest/testdata/config/03_nested_import/nested_import02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import03_config.json b/atest/testdata/config/03_nested_import/nested_import03_config.json index 02741896..013d66e1 100644 --- a/atest/testdata/config/03_nested_import/nested_import03_config.json +++ b/atest/testdata/config/03_nested_import/nested_import03_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import04_config.json b/atest/testdata/config/03_nested_import/nested_import04_config.json index 9af9dc4b..928d27ef 100644 --- a/atest/testdata/config/03_nested_import/nested_import04_config.json +++ b/atest/testdata/config/03_nested_import/nested_import04_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/nested_imported01_config.json" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import05_config.json b/atest/testdata/config/03_nested_import/nested_import05_config.json index a672364b..dc290eb6 100644 --- a/atest/testdata/config/03_nested_import/nested_import05_config.json +++ b/atest/testdata/config/03_nested_import/nested_import05_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import06_config.json b/atest/testdata/config/03_nested_import/nested_import06_config.json index 30abdfb3..d76ff59d 100644 --- a/atest/testdata/config/03_nested_import/nested_import06_config.json +++ b/atest/testdata/config/03_nested_import/nested_import06_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/nested_imported03_config.json" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import07_config.json b/atest/testdata/config/03_nested_import/nested_import07_config.json index e9b70dff..07be53e0 100644 --- a/atest/testdata/config/03_nested_import/nested_import07_config.json +++ b/atest/testdata/config/03_nested_import/nested_import07_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import08_config.json b/atest/testdata/config/03_nested_import/nested_import08_config.json index 23fa03f7..a1780fa7 100644 --- a/atest/testdata/config/03_nested_import/nested_import08_config.json +++ b/atest/testdata/config/03_nested_import/nested_import08_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/03_nested_import/nested_import09_config.json b/atest/testdata/config/03_nested_import/nested_import09_config.json index a6f20059..0f10b060 100644 --- a/atest/testdata/config/03_nested_import/nested_import09_config.json +++ b/atest/testdata/config/03_nested_import/nested_import09_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" -} \ No newline at end of file +} diff --git a/atest/testdata/config/04_re_import/re_import_file01_config.json b/atest/testdata/config/04_re_import/re_import_file01_config.json index 219b332e..c11b9121 100644 --- a/atest/testdata/config/04_re_import/re_import_file01_config.json +++ b/atest/testdata/config/04_re_import/re_import_file01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" - } \ No newline at end of file + } diff --git a/atest/testdata/config/05_sub_datastructure/json_update_01.json b/atest/testdata/config/05_sub_datastructure/json_update_01.json index 6b96aa06..8732d65e 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_01.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,4 +15,4 @@ { ${preprocessor}['definitions']['preproFloatParam']: 1999 -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/json_update_02.json b/atest/testdata/config/05_sub_datastructure/json_update_02.json index f40d149d..41df781f 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_02.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ ${params}['glo']['globalString']: "Welcome to Jsonpreprocessor Acceptance Test", "${preprocessor}['definitions']['preproStructure']['variable_01']": 0.192, ${Project}: "Acceptance Testing" -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/json_update_03.json b/atest/testdata/config/05_sub_datastructure/json_update_03.json index 5e2e3cbe..32657a88 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_03.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ //************************************************************************** { - ${preprocessor}['definitions']['preproStructure'][${params}['glo']['globalStructure']['general']]: + ${preprocessor}['definitions']['preproStructure'][${params}['glo']['globalStructure']['general']]: 0.92 -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/json_update_04.json b/atest/testdata/config/05_sub_datastructure/json_update_04.json index 0fb414d1..36d98296 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_04.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_04.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,4 +15,4 @@ { ${params}['glo']['globalString']: ${preprocessor}['definitions']['preproTest']['checkParam'] -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/json_update_05.json b/atest/testdata/config/05_sub_datastructure/json_update_05.json index 02169073..ee97bd29 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_05.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_05.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,4 +15,4 @@ { "${preprocessor}['definitions']['preproTest'][${preprocessor}['definitions']['preproStructure']['variable_02']]": ${params}['glo']['globalString'] -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/json_update_06.json b/atest/testdata/config/05_sub_datastructure/json_update_06.json index 53da6696..d8955d98 100644 --- a/atest/testdata/config/05_sub_datastructure/json_update_06.json +++ b/atest/testdata/config/05_sub_datastructure/json_update_06.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,4 +38,4 @@ } } } -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/sub_data_structure_01.json b/atest/testdata/config/05_sub_datastructure/sub_data_structure_01.json index 83d74249..28854649 100644 --- a/atest/testdata/config/05_sub_datastructure/sub_data_structure_01.json +++ b/atest/testdata/config/05_sub_datastructure/sub_data_structure_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,11 +19,11 @@ // Global parameters "glo": { "globalIntParam" : 1, - + "globalFloatParam" : 1.332, - + "globalString" : "This is a string", - + "globalStructure": { "general": "general" } @@ -32,13 +32,13 @@ "preprocessor": { "definitions": { "preprolIntParam" : 1, - + "preproFloatParam" : 1.332, - + "global123": "global", - + "preproString" : "This is a string", - + "preproStructure": { "general": "general", "variable_01": 19, @@ -56,4 +56,4 @@ }, "Project": "JsonPreprocessor", "Summary": "Acceptance testing for sub data structure feature" -} \ No newline at end of file +} diff --git a/atest/testdata/config/05_sub_datastructure/sub_data_structure_02.json b/atest/testdata/config/05_sub_datastructure/sub_data_structure_02.json index 0918c9ea..87c9acdb 100644 --- a/atest/testdata/config/05_sub_datastructure/sub_data_structure_02.json +++ b/atest/testdata/config/05_sub_datastructure/sub_data_structure_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,11 +20,11 @@ // Global parameters "glo": { "globalIntParam" : 1, - + "globalFloatParam" : 1.332, - + "globalString" : "This is a string", - + "globalStructure": { "general": "general" } @@ -33,13 +33,13 @@ "preprocessor": { "definitions": { "preprolIntParam" : 1, - + "preproFloatParam" : 1.332, - + "global123": "global", - + "preproString" : "This is a string", - + "preproStructure": { "general": "general", "arrayTest02": [20, {"check1": "check1", "check2": 20}, 40], @@ -58,4 +58,4 @@ }, "Project": "JsonPreprocessor", "Summary": "Acceptance testing for sub data structure feature" -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/common/definitions_common.json b/atest/testdata/config/06_override_params/common/definitions_common.json index 560e66fb..18137896 100644 --- a/atest/testdata/config/06_override_params/common/definitions_common.json +++ b/atest/testdata/config/06_override_params/common/definitions_common.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ { "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPreproString" : "This is a string", - + "gPreproStructure": { "general": "general", "test01": 1 }, "scope": "For testing purpose" -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/common/global.json b/atest/testdata/config/06_override_params/common/global.json index 7ceabc3f..beb96f23 100644 --- a/atest/testdata/config/06_override_params/common/global.json +++ b/atest/testdata/config/06_override_params/common/global.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ } } }, - + "audio": { "volume": { "bSupported": true, @@ -68,8 +68,8 @@ "software": { "sVersion": "BITS_20.16.0", "NaviData.sVersion": "Navi-EU" - } - } + } + } } } diff --git a/atest/testdata/config/06_override_params/common/overrided_params.json b/atest/testdata/config/06_override_params/common/overrided_params.json index f8b47bd3..c158f741 100644 --- a/atest/testdata/config/06_override_params/common/overrided_params.json +++ b/atest/testdata/config/06_override_params/common/overrided_params.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/atest/testdata/config/06_override_params/common/test_config.json b/atest/testdata/config/06_override_params/common/test_config.json index 077ca502..a98db01c 100644 --- a/atest/testdata/config/06_override_params/common/test_config.json +++ b/atest/testdata/config/06_override_params/common/test_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,4 +28,4 @@ "TesttestParams2": "testParams2" } } -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/project_config_01.json b/atest/testdata/config/06_override_params/project_config_01.json index 831e238d..8ce294cc 100644 --- a/atest/testdata/config/06_override_params/project_config_01.json +++ b/atest/testdata/config/06_override_params/project_config_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -86,4 +86,4 @@ ${version}['patchversion']: 1, ${params}['global']['dSUT']['system']['sDetails']: "Params override testing", "YearOfDevelopment": 2021 -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/project_config_02.json b/atest/testdata/config/06_override_params/project_config_02.json index efa6d852..95d17194 100644 --- a/atest/testdata/config/06_override_params/project_config_02.json +++ b/atest/testdata/config/06_override_params/project_config_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -86,4 +86,4 @@ ${gPreproStructure}['test01']: 99, ${gPreproFloatParam}: 9.876, "YearOfDevelopment": 2021 -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/project_config_03.json b/atest/testdata/config/06_override_params/project_config_03.json index ae484ea1..b63ef36b 100644 --- a/atest/testdata/config/06_override_params/project_config_03.json +++ b/atest/testdata/config/06_override_params/project_config_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,4 +30,4 @@ } }, "YearOfDevelopment": 2021 -} \ No newline at end of file +} diff --git a/atest/testdata/config/06_override_params/project_config_04.json b/atest/testdata/config/06_override_params/project_config_04.json index 01029d3d..1782a982 100644 --- a/atest/testdata/config/06_override_params/project_config_04.json +++ b/atest/testdata/config/06_override_params/project_config_04.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ "preprocessor": { "definitions": { "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPreproString" : "This is a string", - + "gPreproStructure": { "general": "general", "testing": 19, @@ -64,4 +64,4 @@ "convert_none_to_string": "${params}['global']['None_variable']", "convert_true_to_string": "${params}['global']['True_variable']", "convert_false_to_string": "${params}['global']['False_variable']" - } \ No newline at end of file + } diff --git a/atest/testdata/config/07_json_format/json_format_01.json b/atest/testdata/config/07_json_format/json_format_01.json index 21d0783b..e9ff5da8 100644 --- a/atest/testdata/config/07_json_format/json_format_01.json +++ b/atest/testdata/config/07_json_format/json_format_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -43,4 +43,4 @@ }, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" -} \ No newline at end of file +} diff --git a/atest/testdata/config/07_json_format/json_format_02.json b/atest/testdata/config/07_json_format/json_format_02.json index 7c653945..7d120153 100644 --- a/atest/testdata/config/07_json_format/json_format_02.json +++ b/atest/testdata/config/07_json_format/json_format_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ "minorversion": "1", "patchversion": "1" }, - + // This is comment feature of jsonpreprocessor package. // The global parameters are defined here. "params": { @@ -34,17 +34,17 @@ } } }, - + // preprocessor parameters were defined here "preprocessor": { "definitions": { - + "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPrepro//String" : "This is a string", - + "gPreproStructure": { "general": "general", "testing": 19, @@ -54,4 +54,4 @@ }, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" -} \ No newline at end of file +} diff --git a/atest/testdata/config/07_json_format/json_format_03.json b/atest/testdata/config/07_json_format/json_format_03.json index 80f38b4f..7ed18f60 100644 --- a/atest/testdata/config/07_json_format/json_format_03.json +++ b/atest/testdata/config/07_json_format/json_format_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ "minorversion": "1", // Test version. "patchversion": "1" }, - + // This is comment feature of jsonpreprocessor package. // The global parameters are defined here. "params": { @@ -34,17 +34,17 @@ } } }, - + // preprocessor parameters were defined here "preprocessor": { "definitions": { - + "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPrepro//String" : "This is a string", // Just for test. - + "gPreproStructure": { "general": "general", "testing": 19, @@ -54,4 +54,4 @@ }, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" // Testing purpose -} \ No newline at end of file +} diff --git a/atest/testdata/config/07_json_format/json_format_04.json b/atest/testdata/config/07_json_format/json_format_04.json index 6b900126..f76c869a 100644 --- a/atest/testdata/config/07_json_format/json_format_04.json +++ b/atest/testdata/config/07_json_format/json_format_04.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,30 +20,30 @@ "majorversion": "0", "minorversion": "1", // Test version. "patchversion": "1" }, - + // This is comment feature of jsonpreprocessor package. // The global parameters are defined here. "params": { - "global": + "global": { "gGlobalIntParam" : 1, // Testing purpose "gGlobalFloatParam" : 1.332, "gGlobal//String" : "https://www.robfwaio.com", "gGlobalStructure": { "general": "general" } } }, - + // preprocessor parameters were defined here "preprocessor": { - "definitions": - + "definitions": + { "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPrepro//String" : "This is a string", // Just for test. - + "gPreproStructure": { "general": "general", "testing": 19, "check//01": "check//Param" }}}, // Just testing "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" // Testing purpose -} \ No newline at end of file +} diff --git a/atest/testdata/config/07_json_format/json_format_05.json b/atest/testdata/config/07_json_format/json_format_05.json index 70d6fbe0..9c8497a3 100644 --- a/atest/testdata/config/07_json_format/json_format_05.json +++ b/atest/testdata/config/07_json_format/json_format_05.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,4 +11,4 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -{"Project": "https://www.robfwaio.com","WelcomeString": "Hello... JsonPreprocessor selftest is running now!","version//test": {"majorversion": "0","minorversion": "1","patchversion": "1"},"params": {"global": {"gGlobalIntParam" : 1,"gGlobalFloatParam" : 1.332,"gGlobal//String" : "https://www.robfwaio.com","gGlobalStructure": {"general": "general"}}},"preprocessor": {"definitions": {"gPreprolIntParam" : 1,"gPreproFloatParam" : 1.332,"gPrepro//String" : "This is a string","gPreproStructure": {"general": "general","testing": 19,"check//01": "check//Param"}}},"abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside","Target//Name" : "gen3flex//dlt"} \ No newline at end of file +{"Project": "https://www.robfwaio.com","WelcomeString": "Hello... JsonPreprocessor selftest is running now!","version//test": {"majorversion": "0","minorversion": "1","patchversion": "1"},"params": {"global": {"gGlobalIntParam" : 1,"gGlobalFloatParam" : 1.332,"gGlobal//String" : "https://www.robfwaio.com","gGlobalStructure": {"general": "general"}}},"preprocessor": {"definitions": {"gPreprolIntParam" : 1,"gPreproFloatParam" : 1.332,"gPrepro//String" : "This is a string","gPreproStructure": {"general": "general","testing": 19,"check//01": "check//Param"}}},"abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside","Target//Name" : "gen3flex//dlt"} diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format.json b/atest/testdata/config/08_utf8_encoding/utf8_format.json index acdc5835..272a7a04 100644 --- a/atest/testdata/config/08_utf8_encoding/utf8_format.json +++ b/atest/testdata/config/08_utf8_encoding/utf8_format.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,4 +29,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" - } \ No newline at end of file + } diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_01.json b/atest/testdata/config/08_utf8_encoding/utf8_format_01.json index 7e538e48..5438e8c0 100644 --- a/atest/testdata/config/08_utf8_encoding/utf8_format_01.json +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,4 +30,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" - } \ No newline at end of file + } diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_02.json b/atest/testdata/config/08_utf8_encoding/utf8_format_02.json index 59fa330d..3a31628e 100644 --- a/atest/testdata/config/08_utf8_encoding/utf8_format_02.json +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,4 +29,4 @@ "patchversion": "1" }, "TargetName" : "Device@01" - } \ No newline at end of file + } diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_03.json b/atest/testdata/config/08_utf8_encoding/utf8_format_03.json index 3d38e616..709b23f0 100644 --- a/atest/testdata/config/08_utf8_encoding/utf8_format_03.json +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,4 +32,4 @@ }, "TargetName" : "Device@01", "[import]": "../import/utf8_format_data_03.json" - } \ No newline at end of file + } diff --git a/atest/testdata/config/09_dotdict_format/dotdict_format_config_01.json b/atest/testdata/config/09_dotdict_format/dotdict_format_config_01.json index 600927d6..7b62b922 100644 --- a/atest/testdata/config/09_dotdict_format/dotdict_format_config_01.json +++ b/atest/testdata/config/09_dotdict_format/dotdict_format_config_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,4 +25,4 @@ "newParam_04" : ${params.global.g.Prepro.String.test}, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" - } \ No newline at end of file + } diff --git a/atest/testdata/config/09_dotdict_format/dotdict_format_config_02.json b/atest/testdata/config/09_dotdict_format/dotdict_format_config_02.json index 575f8338..98523269 100644 --- a/atest/testdata/config/09_dotdict_format/dotdict_format_config_02.json +++ b/atest/testdata/config/09_dotdict_format/dotdict_format_config_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,4 +22,4 @@ }, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" - } \ No newline at end of file + } diff --git a/atest/testdata/config/09_dotdict_format/dotdict_format_config_03.json b/atest/testdata/config/09_dotdict_format/dotdict_format_config_03.json index 609a5258..85ac6770 100644 --- a/atest/testdata/config/09_dotdict_format/dotdict_format_config_03.json +++ b/atest/testdata/config/09_dotdict_format/dotdict_format_config_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,4 +23,4 @@ ${params.global.gPrepro.Structure.general} : "Update value", "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" - } \ No newline at end of file + } diff --git a/atest/testdata/config/09_dotdict_format/dotdict_format_config_04.json b/atest/testdata/config/09_dotdict_format/dotdict_format_config_04.json index fff6155d..72eea708 100644 --- a/atest/testdata/config/09_dotdict_format/dotdict_format_config_04.json +++ b/atest/testdata/config/09_dotdict_format/dotdict_format_config_04.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,4 +22,4 @@ ${params.global.gPrepro.Structure.test.Structure} : ${params.global.gPrepro.Structure.general}, "abc" : "This is a multline string\nwith\nhttp://www.google.de\na link inside", "Target//Name" : "gen3flex//dlt" - } \ No newline at end of file + } diff --git a/atest/testdata/config/09_dotdict_format/import/dotdict_format_common.json b/atest/testdata/config/09_dotdict_format/import/dotdict_format_common.json index 2a913c13..633c987b 100644 --- a/atest/testdata/config/09_dotdict_format/import/dotdict_format_common.json +++ b/atest/testdata/config/09_dotdict_format/import/dotdict_format_common.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ { "gPreprol.IntParam" : 1, - + "gPrepro.Float.Param" : 1.332, - + "g.Prepro.String.test" : "This is a string", - + "gPrepro.Structure": { "test.Structure": "general", "general": "Structure test" }, "scope.Check": "For testing purpose" - } \ No newline at end of file + } diff --git a/atest/testdata/config/import/imported_file01_config.json b/atest/testdata/config/import/imported_file01_config.json index 0fa85266..6924778e 100644 --- a/atest/testdata/config/import/imported_file01_config.json +++ b/atest/testdata/config/import/imported_file01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ { "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPreproString" : "This is a string", - + "gPreproStructure": { "general": "general" } -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/imported_file02_config.json b/atest/testdata/config/import/imported_file02_config.json index 277e51bb..b53ee854 100644 --- a/atest/testdata/config/import/imported_file02_config.json +++ b/atest/testdata/config/import/imported_file02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ // This is to distinguish the different types of resets { "file02IntParam" : 100, - + "file02FloatParam" : 0.145, "file02StructureParam": { @@ -26,6 +26,6 @@ "general02": 10 } }, - + "file02StringParam" : "Imported file 02" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_import/nested_file01_config.json b/atest/testdata/config/import/nested_import/nested_file01_config.json index ff222561..d6797cb6 100644 --- a/atest/testdata/config/import/nested_import/nested_file01_config.json +++ b/atest/testdata/config/import/nested_import/nested_file01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,4 +19,4 @@ "oNestedParam2": { "general": "general" } -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_import/nested_file02_config.json b/atest/testdata/config/import/nested_import/nested_file02_config.json index 2569e923..9bafe43a 100644 --- a/atest/testdata/config/import/nested_import/nested_file02_config.json +++ b/atest/testdata/config/import/nested_import/nested_file02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,4 +20,4 @@ "testObject1": "testObject1", "testObject2": "testObject2" } -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_import/nested_file03_config.json b/atest/testdata/config/import/nested_import/nested_file03_config.json index 7b80759b..0a0fdc56 100644 --- a/atest/testdata/config/import/nested_import/nested_file03_config.json +++ b/atest/testdata/config/import/nested_import/nested_file03_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,4 +20,4 @@ "[Import]": "./nested_file01_config.json", "paramObject2": "paramObject2" } -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported01_config.json b/atest/testdata/config/import/nested_imported01_config.json index deedb77b..dec2ab6c 100644 --- a/atest/testdata/config/import/nested_imported01_config.json +++ b/atest/testdata/config/import/nested_imported01_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ { "[import]" : "./nested_import/nested_file01_config.json", - + "gPreprolIntParam" : 11, "gPreproStructure": { "general": "general" }, - + "gPreproString" : "This is a string" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported02_config.json b/atest/testdata/config/import/nested_imported02_config.json index 5145a231..ea741581 100644 --- a/atest/testdata/config/import/nested_imported02_config.json +++ b/atest/testdata/config/import/nested_imported02_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,13 +13,13 @@ // limitations under the License. //***************************************************************************** -{ +{ "gPreprolIntParam" : 11, "gPreproStructure": { "[import]" : "./nested_import/nested_file01_config.json", "general": "general" }, - + "gPreproString" : "This is a string" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported03_config.json b/atest/testdata/config/import/nested_imported03_config.json index 559daac3..7b1da0a3 100644 --- a/atest/testdata/config/import/nested_imported03_config.json +++ b/atest/testdata/config/import/nested_imported03_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,14 +13,14 @@ // limitations under the License. //***************************************************************************** -{ +{ "gPreprolIntParam" : 11, "gPreproStructure": { "general": "general" }, - + "gPreproString" : "This is a string", "[import]" : "./nested_import/nested_file01_config.json" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported04_config.json b/atest/testdata/config/import/nested_imported04_config.json index 61b77b8a..5cc92981 100644 --- a/atest/testdata/config/import/nested_imported04_config.json +++ b/atest/testdata/config/import/nested_imported04_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,13 +14,13 @@ //***************************************************************************** { - "[import]" : "./nested_import/nested_file01_config.json", - "[import]" : "./nested_import/nested_file02_config.json", + "[import]" : "./nested_import/nested_file01_config.json", + "[import]" : "./nested_import/nested_file02_config.json", "gPreprolIntParam" : 11, "gPreproStructure": { "general": "general" }, - + "gPreproString" : "This is a string" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported05_config.json b/atest/testdata/config/import/nested_imported05_config.json index 95ac8a26..6a4a4a9a 100644 --- a/atest/testdata/config/import/nested_imported05_config.json +++ b/atest/testdata/config/import/nested_imported05_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,13 +13,13 @@ // limitations under the License. //***************************************************************************** -{ +{ "gPreprolIntParam" : 11, - "[import]" : "./nested_import/nested_file01_config.json", + "[import]" : "./nested_import/nested_file01_config.json", "gPreproStructure": { - "[import]" : "./nested_import/nested_file02_config.json", + "[import]" : "./nested_import/nested_file02_config.json", "general": "general" }, - + "gPreproString" : "This is a string" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/nested_imported06_config.json b/atest/testdata/config/import/nested_imported06_config.json index 05229bfa..41b30c1e 100644 --- a/atest/testdata/config/import/nested_imported06_config.json +++ b/atest/testdata/config/import/nested_imported06_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,13 +13,13 @@ // limitations under the License. //***************************************************************************** -{ +{ "gPreprolIntParam" : 11, - "[import]" : "./nested_import/nested_file03_config.json", + "[import]" : "./nested_import/nested_file03_config.json", "gPreproStructure": { - "[import]" : "./nested_import/nested_file02_config.json", + "[import]" : "./nested_import/nested_file02_config.json", "general": "general" }, - + "gPreproString" : "This is a string" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/utf8_format_data.json b/atest/testdata/config/import/utf8_format_data.json index 240b1bd5..9251487b 100644 --- a/atest/testdata/config/import/utf8_format_data.json +++ b/atest/testdata/config/import/utf8_format_data.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,4 +20,4 @@ "Thai": "นี่คือการทดสอบตัวเอง UTF-8", "Korean": "이것은 UTF-8 자체 테스트입니다", "Chinese": "這是 UTF-8 自測" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/utf8_format_data_01.json b/atest/testdata/config/import/utf8_format_data_01.json index 21e42f04..8afa0435 100644 --- a/atest/testdata/config/import/utf8_format_data_01.json +++ b/atest/testdata/config/import/utf8_format_data_01.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ "Thai": "นี่คือการทดสอบตัวเอง UTF-8", "Korean": "이것은 UTF-8 자체 테스트입니다", "Chinese": "這是 UTF-8 自測" -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/utf8_format_data_02.json b/atest/testdata/config/import/utf8_format_data_02.json index 28a95c47..f39fccf4 100644 --- a/atest/testdata/config/import/utf8_format_data_02.json +++ b/atest/testdata/config/import/utf8_format_data_02.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,4 +20,4 @@ "Thai": False, "Korean": [1, 2, "List", 4, 5], "Chinese": None -} \ No newline at end of file +} diff --git a/atest/testdata/config/import/utf8_format_data_03.json b/atest/testdata/config/import/utf8_format_data_03.json index 7080e725..ed798c16 100644 --- a/atest/testdata/config/import/utf8_format_data_03.json +++ b/atest/testdata/config/import/utf8_format_data_03.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/atest/testdata/config/testsuites_config.json b/atest/testdata/config/testsuites_config.json index 7552eec7..9965db1d 100644 --- a/atest/testdata/config/testsuites_config.json +++ b/atest/testdata/config/testsuites_config.json @@ -1,4 +1,4 @@ -// Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +// Copyright 2020-2023 Robert Bosch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ //***************************************************************************** // The file configures the access to all variant dependent on test purpose. // -// The path to the *.json files depends on the test file location. A -// different number of ../ is required dependend on the directory depth of the test +// The path to the *.json files depends on the test file location. A +// different number of ../ is required dependend on the directory depth of the test // case location. //***************************************************************************** { @@ -105,4 +105,4 @@ "name": "sub_data_structure_02.json", "path": "./05_sub_datastructure" } -} \ No newline at end of file +} diff --git a/atest/testdata/templates.py b/atest/testdata/templates.py index 1d027516..30df8731 100644 --- a/atest/testdata/templates.py +++ b/atest/testdata/templates.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,307 +12,307 @@ # See the License for the specific language governing permissions and # limitations under the License. PROPERCONFIGFILE = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILE01 = { - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILE02 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, + }, 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILE03 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, - 'TargetName': 'Device@01', - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + }, + 'TargetName': 'Device@01', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' } } IMPORTEDFILE04 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'majorversion': '0', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' }, - 'minorversion': '1', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILES01 = { - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, - 'file02IntParam': 100, - 'file02FloatParam': 0.145, + }, + 'file02IntParam': 100, + 'file02FloatParam': 0.145, 'file02StructureParam': { - 'iTestParam': 999, + 'iTestParam': 999, 'general': { - 'general01': 'general01', + 'general01': 'general01', 'general02': 10 } - }, - 'file02StringParam': 'Imported file 02', - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'file02StringParam': 'Imported file 02', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILES02 = { - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01', - 'file02IntParam': 100, - 'file02FloatParam': 0.145, + 'file02IntParam': 100, + 'file02FloatParam': 0.145, 'file02StructureParam': { - 'iTestParam': 999, + 'iTestParam': 999, 'general': { - 'general01': 'general01', + 'general01': 'general01', 'general02': 10 } - }, + }, 'file02StringParam': 'Imported file 02' } IMPORTEDFILES03 = { 'Project': 'JsonPreprocessor', - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { 'majorversion': '0', - 'file02IntParam': 100, - 'file02FloatParam': 0.145, + 'file02IntParam': 100, + 'file02FloatParam': 0.145, 'file02StructureParam': { - 'iTestParam': 999, + 'iTestParam': 999, 'general': { - 'general01': 'general01', + 'general01': 'general01', 'general02': 10 } - }, - 'file02StringParam': 'Imported file 02', - 'minorversion': '1', + }, + 'file02StringParam': 'Imported file 02', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } IMPORTEDFILES04 = { 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { 'majorversion': '0', - 'gPreprolIntParam': 1, - 'gPreproFloatParam': 1.332, - 'gPreproString': 'This is a string', + 'gPreprolIntParam': 1, + 'gPreproFloatParam': 1.332, + 'gPreproString': 'This is a string', 'gPreproStructure': { 'general': 'general' - }, - 'minorversion': '1', + }, + 'minorversion': '1', 'patchversion': '1', - 'file02IntParam': 100, - 'file02FloatParam': 0.145, + 'file02IntParam': 100, + 'file02FloatParam': 0.145, 'file02StructureParam': { - 'iTestParam': 999, + 'iTestParam': 999, 'general': { - 'general01': 'general01', + 'general01': 'general01', 'general02': 10 } - }, - 'file02StringParam': 'Imported file 02' - }, + }, + 'file02StringParam': 'Imported file 02' + }, 'TargetName': 'Device@01' } NESTEDIMPORT01 = { - 'iNestedParam1': 11, + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' }, - 'gPreprolIntParam': 11, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, - 'gPreproString': 'This is a string', - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'gPreproString': 'This is a string', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } NESTEDIMPORT02 = { - 'Project': 'JsonPreprocessor', - 'iNestedParam1': 11, + 'Project': 'JsonPreprocessor', + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' - }, - 'gPreprolIntParam': 11, + }, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, - 'gPreproString': 'This is a string', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + }, + 'gPreproString': 'This is a string', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } NESTEDIMPORT03 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'iNestedParam1': 11, + 'majorversion': '0', + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' - }, - 'gPreprolIntParam': 11, + }, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, + }, 'gPreproString': 'This is a string', - 'minorversion': '1', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } NESTEDIMPORT04 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01', - 'iNestedParam1': 11, + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' - }, - 'gPreprolIntParam': 11, + }, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, + }, 'gPreproString': 'This is a string', } NESTEDIMPORT05 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'gPreprolIntParam': 11, + 'majorversion': '0', + 'gPreprolIntParam': 11, 'gPreproStructure': { - 'iNestedParam1': 11, + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' - }, + }, 'general': 'general' - }, + }, 'gPreproString': 'This is a string', - 'minorversion': '1', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } NESTEDIMPORT06 = { - 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'Project': 'JsonPreprocessor', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01', - 'gPreprolIntParam': 11, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, + }, 'gPreproString': 'This is a string', - 'iNestedParam1': 11, + 'iNestedParam1': 11, 'oNestedParam2': { 'general': 'general' } @@ -323,31 +323,31 @@ "iNestedParam1" : 11, "oNestedParam2": { "general": "general" - }, + }, "iNestedTest1" : 9999, "oNestedTest2": { "testObject1": "testObject1", "testObject2": "testObject2" }, - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', - 'minorversion': '1', + 'majorversion': '0', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01', - 'gPreprolIntParam': 11, + 'gPreprolIntParam': 11, 'gPreproStructure': { 'general': 'general' - }, + }, 'gPreproString': 'This is a string' } NESTEDIMPORT08 = { 'Project': 'JsonPreprocessor', - 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', + 'WelcomeString': 'Hello... JsonPreprocessor selftest is running now!', 'version': { - 'majorversion': '0', + 'majorversion': '0', "gPreprolIntParam" : 11, "iNestedParam1" : 11, @@ -359,13 +359,13 @@ "oNestedTest2": { "testObject1": "testObject1", "testObject2": "testObject2" - }, + }, "general": "general" }, "gPreproString" : "This is a string", - 'minorversion': '1', + 'minorversion': '1', 'patchversion': '1' - }, + }, 'TargetName': 'Device@01' } @@ -384,7 +384,7 @@ "general": "general" }, "paramObject2": "paramObject2" - }, + }, "gPreproStructure": { "iNestedTest1" : 9999, @@ -394,7 +394,7 @@ }, "general": "general" }, - + "gPreproString" : "This is a string", "minorversion": "1", "patchversion": "1" @@ -485,13 +485,13 @@ }, "preprocessor": { "definitions": { - + "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, - + "gPrepro//String" : "This is a string", - + "gPreproStructure": { "general": "general", "testing": 19, @@ -530,4 +530,4 @@ } } } -} \ No newline at end of file +} diff --git a/config/CRepositoryConfig.py b/config/CRepositoryConfig.py index 23104b35..085461b3 100644 --- a/config/CRepositoryConfig.py +++ b/config/CRepositoryConfig.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ # # - All paths to subfolder depends on the repository root path that has to be provided # to constructor of CRepositoryConfig -# +# # -------------------------------------------------------------------------------------------------------------- # # 05.07.2022 diff --git a/config/__init__.py b/config/__init__.py index 5cd8f179..ecd4c3ff 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dump_repository_config.py b/dump_repository_config.py index fcc051b8..e35a0b30 100644 --- a/dump_repository_config.py +++ b/dump_repository_config.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/genpackagedoc.py b/genpackagedoc.py index f948d6de..776f1fea 100644 --- a/genpackagedoc.py +++ b/genpackagedoc.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packagedoc/additional_docs/Appendix.rst b/packagedoc/additional_docs/Appendix.rst index d70d0c0b..ca5b99a6 100644 --- a/packagedoc/additional_docs/Appendix.rst +++ b/packagedoc/additional_docs/Appendix.rst @@ -1,4 +1,4 @@ -.. Copyright 2020-2022 Robert Bosch GmbH +.. Copyright 2020-2023 Robert Bosch GmbH .. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packagedoc/additional_docs/Description.rst b/packagedoc/additional_docs/Description.rst index f9e7d889..94121cfc 100644 --- a/packagedoc/additional_docs/Description.rst +++ b/packagedoc/additional_docs/Description.rst @@ -1,4 +1,4 @@ -.. Copyright 2020-2022 Robert Bosch GmbH +.. Copyright 2020-2023 Robert Bosch GmbH .. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -75,9 +75,9 @@ Users can use JsonPreprocessor to handle the json file with its original format. Adding the comments ~~~~~~~~~~~~~~~~~~~ -Often large projects require a lot of configuration parameters. So adding comments to json files is -useful in case of more and more content is added, e.g. because of a json file has to hold a huge number -of configuration parameters for different features. Comments can be used here to clarify the meaning of +Often large projects require a lot of configuration parameters. So adding comments to json files is +useful in case of more and more content is added, e.g. because of a json file has to hold a huge number +of configuration parameters for different features. Comments can be used here to clarify the meaning of these parameters or the differences between them. Every line starting with **"//"**, is commented out. Therefore a comment is valid for singles lines only. @@ -118,12 +118,12 @@ Comment out a block of several lines with only one start and one end comment str Imports other json files ~~~~~~~~~~~~~~~~~~~~~~~~ -This import feature enables developers to take over the content of other json files into the +This import feature enables developers to take over the content of other json files into the current json file. A json file that is imported into another json file, can contain imports also (allows nested imports). -A possible usecase for nested imports is to handle configuration parameters of different variants -of a feature or a component within a bunch of several smaller files, instead of putting all parameter +A possible usecase for nested imports is to handle configuration parameters of different variants +of a feature or a component within a bunch of several smaller files, instead of putting all parameter into only one large json file. **Example:** @@ -142,9 +142,9 @@ Suppose we have the json file ``params_global.json`` with the content: // This is to distinguish the different types of resets { "import_param_1" : "value_1", - + "import_param_2" : "value_2", - + "import_structure_1": { // "general": "general" } @@ -162,11 +162,11 @@ And other json file ``preprocessor_definitions.json`` with content: //***************************************************************************** { "import_param_3" : "value_3", - + "import_param_4" : "value_4", // - + "import_structure_2": { "general": "general" } @@ -237,13 +237,13 @@ After all imports are resolved by the JsonPreprocessor, this is the resulting of Add new or overwrites existing parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This JsonPreprocessor package also provides developers ability to add new as well as overwrite -existing parameters. Developers can update parameters which are already declared and add new -parameters or new element into existing parameters. The below example will show the way to do +This JsonPreprocessor package also provides developers ability to add new as well as overwrite +existing parameters. Developers can update parameters which are already declared and add new +parameters or new element into existing parameters. The below example will show the way to do these features. -In case we have many different variants, and each variant requires a different value assigned -to the parameter, users can use this feature to add new parameters and update new values for +In case we have many different variants, and each variant requires a different value assigned +to the parameter, users can use this feature to add new parameters and update new values for existing parameters of existing configuation object. **Example:** @@ -262,9 +262,9 @@ Suppose we have the json file ``params_global.json`` with the content: // This is to distinguish the different types of resets { "import_param_1" : "value_1", - + "import_param_2" : "value_2", - + "import_structure_1": { // "general": "general" } @@ -288,7 +288,7 @@ Then we import ``params_global.json`` to json file ``config.json`` with content: }, "device" : "device_name", // Overwrite parameters - "${params}['global']['import_param_1']": "new_value_1", + "${params}['global']['import_param_1']": "new_value_1", "${version}['patch']": "2", // Add new parameters "new_param": { @@ -329,7 +329,7 @@ After all imports are resolved by the JsonPreprocessor, this is the resulting of Using defined parameters ~~~~~~~~~~~~~~~~~~~~~~~~ -With JsonPreprocessor package, users can also use the defined parameters in Json file. The value of +With JsonPreprocessor package, users can also use the defined parameters in Json file. The value of the defined parameter could be called with syntax ``${}`` **Example:** diff --git a/packagedoc/additional_docs/Description_orig.rst b/packagedoc/additional_docs/Description_orig.rst index 7651ae7a..e7e7b8ec 100644 --- a/packagedoc/additional_docs/Description_orig.rst +++ b/packagedoc/additional_docs/Description_orig.rst @@ -1,4 +1,4 @@ -.. Copyright 2020-2022 Robert Bosch GmbH +.. Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ Introduction: .. image:: /images/python3-jsonpreprocessor.png -The JsonPreprocessor is a Python3 package which allows programmers to handle +The JsonPreprocessor is a Python3 package which allows programmers to handle additional features in json files such as * add comments @@ -103,7 +103,7 @@ to clarify the meaning of these parameters or the differences between them. Import the contents from other json files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This import feature enables developers to take over the content of other json files into the +This import feature enables developers to take over the content of other json files into the current json file. A json file that is imported into another json file, can contain imports also (allows nested imports). @@ -126,11 +126,11 @@ Suppose we have the json file ``params_global.json`` with the content: // This is to distinguish the different types of resets { "gGlobalIntParam" : 1, - + "gGlobalFloatParam" : 1.332, // This parameter is used to configure for .... - + "gGlobalString" : "This is a string", - + "gGlobalStructure": { "general": "general" } @@ -148,11 +148,11 @@ And other json file ``preprocessor_definitions.json`` with content: //***************************************************************************** { "gPreprolIntParam" : 1, - + "gPreproFloatParam" : 1.332, // The parameter for feature ABC "gPreproString" : "This is a string", - + "gPreproStructure": { "general": "general" } @@ -230,12 +230,12 @@ The ``config.json`` file is handled by JsonPreprocessor package, then return the Overwrite existing and add new parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This package also provides user ability to overwrite or update as well as add new -parameters. User can update parameters which are already declared and add new parameters -or new element into existing parameters. The below example will show the way to do +This package also provides user ability to overwrite or update as well as add new +parameters. User can update parameters which are already declared and add new parameters +or new element into existing parameters. The below example will show the way to do these features. -In case we have many different variants, and each variant requires a different value +In case we have many different variants, and each variant requires a different value assigned to the parameter. This feature could help us update new value for existing parameters, it also supports to add new parameters to existing configuation object. @@ -247,11 +247,11 @@ Suppose we have the json file ``params_global.json`` with the content: { "gGlobalIntParam" : 1, - + "gGlobalFloatParam" : 1.332, // This parameter is used to configure for .... - + "gGlobalString" : "This is a string", - + "gGlobalStructure": { "general": "general" } @@ -278,7 +278,7 @@ Then we import ``params_global.json`` to json file ``config.json`` with content: }, "TargetName" : "gen3flex@dlt", // Overwrite parameters - "${params}['global']['gGlobalFloatParam']": 9.999, + "${params}['global']['gGlobalFloatParam']": 9.999, "${version}['patchversion']": "2", "${params}['global']['gGlobalString']": "This is the new value for the already existing parameter.", // Add new parameters @@ -410,7 +410,7 @@ Feedback To give us a feedback, you can send an email to `Thomas Pollerspöck `_ or `RBVH-ECM-Automation_Test_Framework-Associates `_ -In case you want to report a bug or request any interesting feature, please don't hesitate to raise a ticket on +In case you want to report a bug or request any interesting feature, please don't hesitate to raise a ticket on `our Jira `_ References diff --git a/packagedoc/additional_docs/History.tex b/packagedoc/additional_docs/History.tex index 3c90fcea..ea46b49c 100644 --- a/packagedoc/additional_docs/History.tex +++ b/packagedoc/additional_docs/History.tex @@ -1,4 +1,4 @@ -% Copyright 2020-2022 Robert Bosch GmbH +% Copyright 2020-2023 Robert Bosch GmbH % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. diff --git a/packagedoc/additional_docs/Introduction.rst b/packagedoc/additional_docs/Introduction.rst index 2a322a1e..d7a6cb16 100644 --- a/packagedoc/additional_docs/Introduction.rst +++ b/packagedoc/additional_docs/Introduction.rst @@ -1,4 +1,4 @@ -.. Copyright 2020-2022 Robert Bosch GmbH +.. Copyright 2020-2023 Robert Bosch GmbH .. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,20 +17,20 @@ Json Preprocessor documentation **This is the documentation for Python JsonPreprocessor** -Json is a format used to represent data and becomes the universal standard of data -exchange. Today many software projects are using configuration file in Json format. -For a big or a complex project there is a need to have some enhanced format in Json +Json is a format used to represent data and becomes the universal standard of data +exchange. Today many software projects are using configuration file in Json format. +For a big or a complex project there is a need to have some enhanced format in Json file such as adding the comments, importing other Json files, etc. -Based on that needs, we develop JsonPreprocessor package: +Based on that needs, we develop JsonPreprocessor package: -* Gives the possibility to comment out parts of the content. This feature can be used to +* Gives the possibility to comment out parts of the content. This feature can be used to explain the meaning of the parameters defined inside the configuration files. * Has ability to import other Json files. This feature can be applied for complex project, users can create separated Json files then importing them to other Json file. -* Allows users using the defined parameter in Json file. +* Allows users using the defined parameter in Json file. * Accepts **``True``**, **``False``**, and **``None``** in Json syntax diff --git a/readme.rst2md.py b/readme.rst2md.py index b16e8f91..079b2f20 100644 --- a/readme.rst2md.py +++ b/readme.rst2md.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sample/001_sample_comments.py b/sample/001_sample_comments.py index c38a31e2..b1b31a2f 100644 --- a/sample/001_sample_comments.py +++ b/sample/001_sample_comments.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sample/003_sample_import.py b/sample/003_sample_import.py index 003e6ae5..65c0ac86 100644 --- a/sample/003_sample_import.py +++ b/sample/003_sample_import.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sample/005_sample_python_syntax.py b/sample/005_sample_python_syntax.py index 6d635db3..042db95a 100644 --- a/sample/005_sample_python_syntax.py +++ b/sample/005_sample_python_syntax.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sample/007_sample_use_of_variables.py b/sample/007_sample_use_of_variables.py index 9b2e1bda..7701bd0e 100644 --- a/sample/007_sample_use_of_variables.py +++ b/sample/007_sample_use_of_variables.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sample/json/json_with_comment.json b/sample/json/json_with_comment.json index 97ba1a01..7b6bb4c7 100644 --- a/sample/json/json_with_comment.json +++ b/sample/json/json_with_comment.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,34 +15,34 @@ // You can write anywhere one line comments /* -This way you can +This way you can write anywhere multiline comments */ { /* - This way you can + This way you can write anywhere multiline comments */ // You can write anywhere one line comments - "myVar1" : "val1", - + "myVar1" : "val1", + "myVar2" : "http://www.google.de", "myVar3" : "val3", // You can write anywhere one line comments "abc" : // You can write anywhere one line comments { /* - This way you can + This way you can write anywhere multiline comments - */ + */ "myVar4" : "val4" }, "def" : { "myVar5" : "val5" // You can write anywhere one line comments } -} \ No newline at end of file +} diff --git a/sample/json/json_with_import.json b/sample/json/json_with_import.json index 60bdc833..e7d49ace 100644 --- a/sample/json/json_with_import.json +++ b/sample/json/json_with_import.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ limitations under the License. */ /* -imports of json files are done by means of the +imports of json files are done by means of the [import] keyword. All imported data will be replace the node which @@ -24,12 +24,12 @@ data structure. This allows to structure big json files into any architecture you require. */ { - "myVar1" : "val1", + "myVar1" : "val1", "myVar2" : "http://www.google.de", "abc" : { - /* + /* import of json files should be always a relative path to the current file. This allows later to shift whole json directories to other places without braking the @@ -49,4 +49,4 @@ into any architecture you require. //one time here, a second time in "second_file.json" "[import]" : "./subfolder/third_file.json" } -} \ No newline at end of file +} diff --git a/sample/json/json_with_python_syntax.json b/sample/json/json_with_python_syntax.json index 40522e76..1811f343 100644 --- a/sample/json/json_with_python_syntax.json +++ b/sample/json/json_with_python_syntax.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,25 +13,25 @@ limitations under the License. */ { //instead of `true` you can use the python-syntax `True` - "myVar1" : True, + "myVar1" : True, "myVar1_" : true, - + //instead of `frue` you can use the python-syntax `False` "myVar2" : False, "myVar2_" : false, //instead of `null` you can use the python-syntax `None` - "myVar3" : None, + "myVar3" : None, "myVar3_" : null, - "abc" : - { - //this is a string -> there is no change + "abc" : + { + //this is a string -> there is no change "myVar4" : "True" }, "def" : { - //this is a string -> there is no change - "myVar5" : "False" + //this is a string -> there is no change + "myVar5" : "False" } -} \ No newline at end of file +} diff --git a/sample/json/json_with_variables.json b/sample/json/json_with_variables.json index 59439a39..b646e6dd 100644 --- a/sample/json/json_with_variables.json +++ b/sample/json/json_with_variables.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ order the [import ] appears in the code the nodes can be referenced by means of ${syntax} as variable. */ -{ +{ // create some initial data "myVar1" : "val1", "myVar2" : "val2", @@ -30,7 +30,7 @@ can be referenced by means of ${syntax} as variable. //give myVar3 the value of "myVar1" "myVar3" : "${myVar1}", - + //give myVar4 the value of ${abc}['arList'][1] "myVar4" : "${abc}['arList'][1]", @@ -42,4 +42,4 @@ can be referenced by means of ${syntax} as variable. //give myVar6 the value new value of node "abc" "myVar6" : "${abc}" -} \ No newline at end of file +} diff --git a/sample/json/second_file.json b/sample/json/second_file.json index e112566b..60cec096 100644 --- a/sample/json/second_file.json +++ b/sample/json/second_file.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. */ { - "second_myVar1" : true, + "second_myVar1" : true, //All imported data will be located in this case below //the root node of this file. @@ -20,4 +20,4 @@ "[import]" : "./subfolder/third_file.json", "second_myVar2" : "http://www.ebay.de" -} \ No newline at end of file +} diff --git a/sample/json/subfolder/third_file.json b/sample/json/subfolder/third_file.json index 925ee1dd..f57f70b8 100644 --- a/sample/json/subfolder/third_file.json +++ b/sample/json/subfolder/third_file.json @@ -1,4 +1,4 @@ -/*Copyright 2020-2022 Robert Bosch Car Multimedia GmbH +/*Copyright 2020-2023 Robert Bosch GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,6 +12,6 @@ See the License for the specific language governing permissions and limitations under the License. */ { - "third_myVar1" : "val1", + "third_myVar1" : "val1", "third_myVar2" : "http://www.amazon.de" -} \ No newline at end of file +} diff --git a/setup.py b/setup.py index 33ea18d8..d6afb209 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # ************************************************************************************************************** # -# Copyright 2020-2022 Robert Bosch GmbH +# Copyright 2020-2023 Robert Bosch GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.