Skip to content

Commit e59100f

Browse files
committed
Use Niels Lohmann's JSON library instead of Qt's
Replace Qt's own JSON library functions by Niels Lohmann's JSON library in the Export JSON dialog. This was necessary because for very large JSON objects Qt's library functions generated incomplete JSON exports. See issue #1789.
1 parent 17a2661 commit e59100f

File tree

10 files changed

+23348
-20
lines changed

10 files changed

+23348
-20
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ else()
7676
find_package(QCustomPlot)
7777
endif()
7878
set(QHEXEDIT_DIR libs/qhexedit)
79+
set(JSON_DIR libs/json)
7980

8081
if(NOT ANTLR2_FOUND)
8182
set(ANTLR_DIR libs/antlr-2.7.7)
@@ -86,6 +87,7 @@ if(NOT QSCINTILLA_FOUND)
8687
add_subdirectory(${QSCINTILLA_DIR})
8788
endif()
8889
add_subdirectory(${QHEXEDIT_DIR})
90+
add_subdirectory(${JSON_DIR})
8991
if(NOT QCUSTOMPLOT_FOUND)
9092
set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
9193
add_subdirectory(${QCUSTOMPLOT_DIR})
@@ -354,6 +356,7 @@ endif()
354356
include_directories(
355357
"${CMAKE_CURRENT_BINARY_DIR}"
356358
${QHEXEDIT_DIR}
359+
${JSON_DIR}
357360
${ADDITIONAL_INCLUDE_PATHS}
358361
src)
359362
if(QCUSTOMPLOT_FOUND)
@@ -401,9 +404,7 @@ if(NOT QSCINTILLA_FOUND)
401404
add_dependencies(${PROJECT_NAME} qscintilla2)
402405
endif()
403406

404-
link_directories(
405-
"${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}"
406-
)
407+
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}")
407408
if(NOT QCUSTOMPLOT_FOUND)
408409
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}")
409410
endif()

libs/json/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 2.8.12.2)
2+
3+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
4+
5+
set(JSON11_HDR
6+
json.hpp
7+
)

libs/json/ChangeLog.md

Lines changed: 1404 additions & 0 deletions
Large diffs are not rendered by default.

libs/json/LICENSE.MIT

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2013-2018 Niels Lohmann
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

libs/json/README.md

Lines changed: 1297 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)