Skip to content

Commit 6363bf1

Browse files
committed
Introduce new JSON parser utility
This patch introduces a utility in OPAL based on the 3rd-party project https://github.com/json-parser/json-parser.git The utility provides APIs to read JSON into memory along with getters to retrieve C values. Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
1 parent 8b4237c commit 6363bf1

File tree

12 files changed

+2102
-22
lines changed

12 files changed

+2102
-22
lines changed

config/opal_config_files.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# Copyright (c) 2020 The University of Tennessee and The University
55
# of Tennessee Research Foundation. All rights
66
# reserved.
7-
# Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
7+
# Copyright (c) 2022-2024 Amazon.com, Inc. or its affiliates.
8+
# All Rights reserved.
89
# $COPYRIGHT$
910
#
1011
# Additional copyrights may follow
@@ -21,6 +22,8 @@ AC_DEFUN([OPAL_CONFIG_FILES],[
2122
opal/include/Makefile
2223
opal/datatype/Makefile
2324
opal/util/Makefile
25+
opal/util/json/Makefile
26+
opal/util/json/3rd-party/Makefile
2427
opal/util/keyval/Makefile
2528
opal/mca/base/Makefile
2629
opal/tools/wrappers/Makefile

opal/util/Makefile.am

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Copyright (c) 2016 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
1919
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
20-
# Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
20+
# Copyright (c) 2020-2024 Amazon.com, Inc. or its affiliates.
2121
# All Rights reserved.
2222
# Copyright (c) 2021 Google, LLC. All rights reserved.
2323
# $COPYRIGHT$
@@ -27,7 +27,9 @@
2727
# $HEADER$
2828
#
2929

30-
SUBDIRS = keyval
30+
SUBDIRS = \
31+
json \
32+
keyval
3133

3234
dist_opaldata_DATA = help-opal-util.txt
3335

@@ -127,8 +129,10 @@ libopalutil_core_la_SOURCES += timings.c
127129
endif
128130

129131
libopalutil_core_la_LIBADD = \
132+
json/libopalutil_json.la \
130133
keyval/libopalutilkeyval.la
131134
libopalutil_core_la_DEPENDENCIES = \
135+
json/libopalutil_json.la \
132136
keyval/libopalutilkeyval.la
133137

134138
# Conditionally install the header files

opal/util/json/3rd-party/Makefile.am

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2024 Amazon.com, Inc. or its affiliates.
3+
# All Rights reserved.
4+
# $COPYRIGHT$
5+
#
6+
# Additional copyrights may follow
7+
#
8+
# $HEADER$
9+
#
10+
11+
noinst_LTLIBRARIES = libopalutil_json_3p.la
12+
13+
libopalutil_json_3p_la_SOURCES = \
14+
json.h \
15+
json.c

0 commit comments

Comments
 (0)