We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa1047 commit 58497f1Copy full SHA for 58497f1
src/cli/convert-json-toml.cpp
@@ -3,6 +3,7 @@
3
#include <openPMD/auxiliary/JSON_internal.hpp>
4
5
#include <iostream>
6
+#include <sstream>
7
#include <string>
8
9
namespace json = openPMD::json;
@@ -38,7 +39,11 @@ int main(int argc, char const **argv)
38
39
// Just read the whole stream into memory
40
// Not very elegant, but we'll hold the entire JSON/TOML dataset
41
// in memory at some point anyway, so it doesn't really matter
- std::cin >> jsonOrToml;
42
+ {
43
+ std::stringbuf readEverything;
44
+ std::cin >> &readEverything;
45
+ jsonOrToml = readEverything.str();
46
+ }
47
break;
48
case 2:
49
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0)
0 commit comments