Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Fix up includes to nlohmann json #29

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN \
cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release && \
cmake --build build --target install && \
# json.hpp
curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/json.hpp && \
curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/nlohmann/json.hpp && \
rm -rf /build/* && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
Expand Down
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ set(JSON_HEADER_URL
set(JSON_HEADER_HASH
ce6b5610a051ec6795fa11c33854abebb086f0fd67c311f5921c3c07f9531b44)

file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/json.hpp
file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/nlohmann/json.hpp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use the install target of the this project so we can also use find_package.

EXPECTED_HASH SHA256=${JSON_HEADER_HASH})

if(USE_BUNDLED_BOOST)
Expand Down
2 changes: 1 addition & 1 deletion examples/crypto_bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <atomic>
#include <fstream>
#include <iostream>
#include <json.hpp>
#include <nlohmann/json.hpp>
#include <stdexcept>
#include <unistd.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <boost/variant.hpp>

#include <iostream>
#include <json.hpp>
#include <nlohmann/json.hpp>
#include <unistd.h>

#include <mtx.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/common.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include <map>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/errors.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/aliases.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/avatar.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/canonical_alias.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/common.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/create.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/encrypted.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/events.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/encryption.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/guest_access.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/history_visibility.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/join_rules.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/member.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/audio.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

#include "mtx/events/common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/emote.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/file.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

#include "mtx/events/common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/image.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

#include "mtx/events/common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/notice.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/text.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/messages/video.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

#include "mtx/events/common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/name.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/pinned_events.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/power_levels.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/redaction.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/tag.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/events/topic.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/identifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <exception>
#include <iostream>

#include <json.hpp>
#include <nlohmann/json.hpp>

namespace mtx {
namespace identifiers {
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/requests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <mtx/common.hpp>

using json = nlohmann::json;
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/common.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/create_room.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

namespace mtx {
namespace responses {
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/crypto.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/common.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/empty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/identifiers.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/groups.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "json.hpp"
#include <nlohmann/json.hpp>

namespace mtx {
namespace responses {
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/login.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/identifiers.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/media.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <string>

namespace mtx {
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/messages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/events/collections.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/notifications.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/events/collections.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/profile.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

namespace mtx {
namespace responses {
Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/register.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include <json.hpp>
#include <nlohmann/json.hpp>

#include "mtx/identifiers.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/sync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "mtx/events.hpp"
#include "mtx/events/collections.hpp"
#include "mtx/identifiers.hpp"
#include <json.hpp>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

Expand Down
2 changes: 1 addition & 1 deletion include/mtx/responses/version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <json.hpp>
#include <nlohmann/json.hpp>

namespace mtx {
namespace responses {
Expand Down
2 changes: 1 addition & 1 deletion include/mtxclient/crypto/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <memory>
#include <new>

#include <json.hpp>
#include <nlohmann/json.hpp>
#include <sodium.h>

#include <mtx/identifiers.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/mtxclient/crypto/types.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "mtxclient/utils.hpp"
#include <json.hpp>
#include <nlohmann/json.hpp>

STRONG_TYPE(UserId, std::string)
STRONG_TYPE(DeviceId, std::string)
Expand Down
Loading