File tree Expand file tree Collapse file tree 7 files changed +289
-19
lines changed Expand file tree Collapse file tree 7 files changed +289
-19
lines changed Original file line number Diff line number Diff line change @@ -3,23 +3,26 @@ AUTOMAKE_OPTIONS = subdir-objects
3
3
bin_PROGRAMS = ficonic
4
4
5
5
ficonic_SOURCES = \
6
+ src/program_info.h \
6
7
src/Curler.cpp \
7
8
src/Curler.h \
8
9
src/main.cpp \
9
10
src/ficon.cpp \
10
11
src/ficon.hpp \
11
- src/program_info.h \
12
+ src/Parser.cpp \
13
+ src/Parser.hpp \
12
14
src/IconsRetriever.cpp \
13
15
src/IconsRetriever.hpp \
16
+ src/HtmlTagAccessor.cpp \
17
+ src/HtmlTagAccessor.hpp \
14
18
src/RootIconsRetriever.cpp \
15
19
src/RootIconsRetriever.hpp \
16
20
src/LinkIconsRetriever.cpp \
17
21
src/LinkIconsRetriever.hpp \
18
22
src/MetaIconsRetriever.cpp \
19
23
src/MetaIconsRetriever.hpp \
20
- src/HtmlTagAccessor.cpp \
21
- src/HtmlTagAccessor.hpp
22
-
24
+ src/PwaIconsRetriever.cpp \
25
+ src/PwaIconsRetriever.hpp
23
26
24
27
ficonic_CPPFLAGS = \
25
28
-I/usr/include/ImageMagick-6 \
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Parser.cpp
3
+ * - Class Parser method implementation
4
+ *
5
+ * Copyright 2022 David Yockey
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ */
20
+
21
+ #include " Parser.hpp"
22
+
23
+ // /// public /////////////////////////////////////////////////////////
24
+
25
+ boost::json::value Parser::parse (std::string json) {
26
+ jsonParser.reset ();
27
+ jsonParser.write (json);
28
+ return jsonParser.release ();
29
+ }
30
+
31
+
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Parser.hpp
3
+ * - Wrapper class for boost::json::parser
4
+ *
5
+ * Copyright 2022 David Yockey
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ */
20
+
21
+ #ifndef SRC_PARSER_HPP_
22
+ #define SRC_PARSER_HPP_
23
+
24
+ #include < string>
25
+ #include < boost/json.hpp>
26
+
27
+ namespace bjs = boost::json;
28
+
29
+ class Parser {
30
+ private:
31
+ bjs::parser jsonParser;
32
+
33
+ public:
34
+ bjs::value parse (std::string json);
35
+ };
36
+
37
+ #endif /* SRC_PARSER_HPP_ */
You can’t perform that action at this time.
0 commit comments