Remove root object parens from jsons

This commit is contained in:
flysand7 2023-07-28 20:53:20 +11:00
parent 8d14b1749a
commit e65506babb
4 changed files with 7 additions and 15 deletions

View File

@ -88,7 +88,9 @@ tinyrt_apis = []
try: try:
print(f" -> Reading file '{tinyrt_config_path}'") print(f" -> Reading file '{tinyrt_config_path}'")
with open(tinyrt_config_path, 'r') as tinyrt_config_file: with open(tinyrt_config_path, 'r') as tinyrt_config_file:
tinyrt_config = pyjson5.load(tinyrt_config_file) string = tinyrt_config_file.read()
json = '{' + string + '}'
tinyrt_config = pyjson5.loads(json)
except Exception as error: except Exception as error:
print(f" -> [ERROR] reading file '{tinyrt_config_path}'") print(f" -> [ERROR] reading file '{tinyrt_config_path}'")
print(f" * {error}") print(f" * {error}")
@ -119,7 +121,9 @@ library_config_path = os.path.join('src', 'library.json')
try: try:
print(f" -> Reading file '{library_config_path}'") print(f" -> Reading file '{library_config_path}'")
with open(library_config_path, 'r') as library_config_file: with open(library_config_path, 'r') as library_config_file:
library_config = pyjson5.load(library_config_file) string = library_config_file.read()
json = '{' + string + '}'
library_config = pyjson5.loads(json)
except Exception as error: except Exception as error:
print(f" -> [ERROR] reading file '{library_config_path}'") print(f" -> [ERROR] reading file '{library_config_path}'")
print(f" * {error}") print(f" * {error}")
@ -248,4 +252,4 @@ if args.test:
if target == 'linux': if target == 'linux':
compile([args.test, cia_lib, crt_lib], 'a', '-pie') compile([args.test, cia_lib, crt_lib], 'a', '-pie')
elif target == 'windows': elif target == 'windows':
compile([args.test, cia_lib, crt_lib], 'a.exe', '-lkernel32.lib') compile([args.test, cia_lib, crt_lib], 'a', '-lkernel32.lib')

View File

@ -1,5 +1,3 @@
{
// Manifest file for the ciabatta build. // Manifest file for the ciabatta build.
// Platform sections describe available platforms and // Platform sections describe available platforms and
@ -76,6 +74,3 @@ apis: [
] ]
} }
] ]
// END
}

View File

@ -1,4 +1,3 @@
{
// This file contains TinyRT API subsets that are exported // This file contains TinyRT API subsets that are exported
// for this operating system, one name per line. This file // for this operating system, one name per line. This file
@ -8,5 +7,3 @@
rt_api_file: true, rt_api_file: true,
rt_api_program: true, rt_api_program: true,
rt_api_shell: false, rt_api_shell: false,
}

View File

@ -1,5 +1,3 @@
{
// This file contains TinyRT API subsets that are exported // This file contains TinyRT API subsets that are exported
// for this operating system, one name per line. This file // for this operating system, one name per line. This file
// is used in a build script to generate tinyrt_macro file // is used in a build script to generate tinyrt_macro file
@ -8,5 +6,3 @@
rt_api_file: true, rt_api_file: true,
rt_api_program: true, rt_api_program: true,
rt_api_shell: false, rt_api_shell: false,
}