Skip to content

Commit 562818c

Browse files
Increase nlohman version + fix breaking change.
Breaking change was introduced by: nlohmann/json#4517 The template takes one more parameter. Bug:#36 Fixed:#36
1 parent 2bfa447 commit 562818c

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ CHANGELOG
44
unreleased:
55
-----------
66

7+
v1.4.1:
8+
-------
9+
- Fix build for FreeBSD without using FetchContent
10+
711
v1.4.0:
812
-----------
913
- Support building json-tui from external packages. Useful for distributions that

CMakeLists.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.24)
22

33
project(json-tui
44
LANGUAGES CXX
5-
VERSION 1.4.0
5+
VERSION 1.4.1
66
)
77

88
option(JSON_TUI_BUILD_TESTS "Set to ON to build tests" OFF)
@@ -16,26 +16,32 @@ set(FETCHCONTENT_QUIET FALSE)
1616

1717
FetchContent_Declare(ftxui
1818
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
19-
GIT_TAG v6.0.0
19+
GIT_TAG v6.0.2
2020
GIT_PROGRESS TRUE
2121
GIT_SHALLOW FALSE
2222
EXCLUDE_FROM_ALL
23-
FIND_PACKAGE_ARGS NAMES ftxui
23+
FIND_PACKAGE_ARGS
24+
6.0.2
25+
NAMES ftxui
2426
)
2527

2628
FetchContent_Declare(nlohmann_json
27-
URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz
29+
URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
2830
EXCLUDE_FROM_ALL
29-
FIND_PACKAGE_ARGS NAMES nlohmann_json
31+
FIND_PACKAGE_ARGS
32+
3.12.0 # Breaking change nlohmann/json/pull/4517
33+
NAMES nlohmann_json
3034
)
3135

3236
FetchContent_Declare(args
33-
GIT_REPOSITORY https://github.com/ArthurSonzogni/args
34-
GIT_TAG 0053db2ecb0f6aba0ecf026bdd699c846458de1e
37+
GIT_REPOSITORY https://github.com/Taywee/args
38+
GIT_TAG 114200a9ad5fe06c8dea76e15d92325695cf3e34
3539
EXCLUDE_FROM_ALL
3640
GIT_PROGRESS TRUE
3741
GIT_SHALLOW FALSE
38-
FIND_PACKAGE_ARGS NAMES args
42+
FIND_PACKAGE_ARGS
43+
6.4.7
44+
NAMES args
3945
)
4046

4147
FetchContent_GetProperties(ftxui)

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: json-tui
2-
version: "1.4.0"
2+
version: "1.4.1"
33
summary: A json visualizer with a terminal UI.
44
description: A json visualizer with a terminal UI.
55

src/main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ int main(int argument_count, const char** arguments) {
8383
}
8484

8585
bool ParseJSON(std::string input, JSON& out) {
86-
class JsonParser : public nlohmann::detail::json_sax_dom_parser<JSON> {
86+
class JsonParser : public nlohmann::detail::json_sax_dom_parser<
87+
JSON, nlohmann::detail::string_input_adapter_type> {
8788
public:
8889
JsonParser(JSON& j)
89-
: nlohmann::detail::json_sax_dom_parser<JSON>(j, false) {}
90+
: nlohmann::detail::json_sax_dom_parser<
91+
JSON,
92+
nlohmann::detail::string_input_adapter_type>(j, false) {}
9093
bool parse_error(std::size_t /*position*/,
9194
const std::string& /*last_token*/,
9295
const JSON::exception& ex) {

0 commit comments

Comments
 (0)