1 //===-- argdumper.cpp --------------------------------------------*- C++-*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Utility/JSON.h"
10 #include "lldb/Utility/StreamString.h"
14 using namespace lldb_private;
16 int main(int argc, char *argv[]) {
17 JSONArray::SP arguments(new JSONArray());
18 for (int i = 1; i < argc; i++) {
19 arguments->AppendObject(JSONString::SP(new JSONString(argv[i])));
22 JSONObject::SP object(new JSONObject());
23 object->SetObject("arguments", arguments);
29 std::cout << ss.GetData() << std::endl;