mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
18 lines
416 B
C++
18 lines
416 B
C++
#include <iostream>
|
|
|
|
#include "simdjson/jsonioutil.h"
|
|
#include "simdjson/jsonminifier.h"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
if (argc != 2) {
|
|
std::cerr << "Usage: " << argv[0] << " <jsonfile>\n";
|
|
exit(1);
|
|
}
|
|
std::pair<u8 *, size_t> p = get_corpus(argv[argc - 1]);
|
|
size_t outlength =
|
|
jsonminify(p.first, p.second, p.first);
|
|
p.first[outlength] = '\0';
|
|
printf("%s",p.first);
|
|
free(p.first);
|
|
}
|