From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABDDFA0597; Wed, 8 Apr 2020 20:15:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB1D81C1C4; Wed, 8 Apr 2020 20:15:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 20D011C1C2 for ; Wed, 8 Apr 2020 20:15:14 +0200 (CEST) IronPort-SDR: aviDlTA/RSX4J998FmyRXyaofquG+QtFVOxsVMVTRLVeC91OZMUZWmqGvzoEV2H8VBccELCaa9 /EF9dF9QSWlQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2020 11:13:04 -0700 IronPort-SDR: N+EZPtulWK9iHb8jw9fyieh3VWHCewGxlhIFd3eG4CweUqOf1Rn9062Zb0XIAOrZqD8sBFXN/B TpNvQPDnKLKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,359,1580803200"; d="scan'208";a="451695217" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga005.fm.intel.com with ESMTP; 08 Apr 2020 11:13:03 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Apr 2020 11:13:02 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 8 Apr 2020 11:13:02 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 8 Apr 2020 11:13:02 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.58) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Apr 2020 11:13:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RqLYOHVQFYm/VND870gf1CdAjJAlVUB06VEZfNhXcCmD0jgiP86XD+2VfLH11fk1Dnyhpbq/qtetnC91ToeIKtZcfzzgcC4pC+U4tgqhv9ABRle27GLiqLBQOTtX6CxsxUWggcb6fVe3aymiHwpTM/sHIgiaizxewC+XWtKKSTIGRLIEyfybdzlim+daPTRcfnK852uu99qBo5nnY3+688KvGrEXLeBEUGFggyUqpnb0zsCtwqf3LXAY8QMtfNtzG/kKshtxHeD6CIuf4BcZsuJCtCqDXEoR4dTXl24635DpDCYmrXh5j9DYDvHJTKZG5uaS0EViT9LwSIav2Yza5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CVihjEHnz5egLTHmgi2uvaO5NCnqyPFHrndE8cgQ4UI=; b=fG4E43+yQRUzfcwqxlceteFYqhNHeJKlNni5ngz9j12z2N86lvexiSydUydHsMqrg4ErTEuymjS2WtIkxtVXx6s1/pAOOmDygG/G9YU2hzIy27kGy/eC+5pnjvOHn4HP6ODPxx/rErixxPUlijaQ5Sgw2RJTaf1w9yaZx6b8hoEaPX53z9L0nFUTkH6unLnQVJBW9jVBDPVFWcuqT5qyRF1ipVswrtr2nTfuuJmo/4nHvFD5TZ/VaTGpG/4hgP7WYpypfBsLvBzYCzV8YwTK7zT8Z2SnRWU0dzv/M20GHPvP4546kip2DAZmvO7Y+sBQlEAxuQiVCR+Ux2siYK8erQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CVihjEHnz5egLTHmgi2uvaO5NCnqyPFHrndE8cgQ4UI=; b=nagBrbKunGxSxzK/byLT3FTVFlvrrgV2tddVFLsPjz7RId2PElNQchUps4xJxEjol+TnAJz22pLqQDzSugN7jbUHQg13yTpbKXpktEMDxsiUPK4+11xQSrUwRXpKiSOh+tH7R0V5h36Gli6bCMMl7KQWglRCcIzwk7dtu2c8onE= Received: from DM6PR11MB4593.namprd11.prod.outlook.com (2603:10b6:5:2a3::8) by DM6PR11MB2604.namprd11.prod.outlook.com (2603:10b6:5:c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.17; Wed, 8 Apr 2020 18:12:58 +0000 Received: from DM6PR11MB4593.namprd11.prod.outlook.com ([fe80::9d18:a682:243f:6d6d]) by DM6PR11MB4593.namprd11.prod.outlook.com ([fe80::9d18:a682:243f:6d6d%3]) with mapi id 15.20.2900.015; Wed, 8 Apr 2020 18:12:57 +0000 From: "Wiles, Keith" To: "Power, Ciara" CC: dev , "Laatz, Kevin" , "Pattan, Reshma" , "jerinjacobk@gmail.com" , "david.marchand@redhat.com" , "mb@smartsharesystems.com" , "thomas@monjalon.net" , "Richardson, Bruce" Thread-Topic: [PATCH v2 06/16] telemetry: add utility functions for creating json Thread-Index: AQHWDchobdXfakmlQ0iwI0xP1jXvhqhvhxiA Date: Wed, 8 Apr 2020 18:12:57 +0000 Message-ID: References: <20200319171907.60891-1-ciara.power@intel.com> <20200408164956.47864-1-ciara.power@intel.com> <20200408164956.47864-7-ciara.power@intel.com> In-Reply-To: <20200408164956.47864-7-ciara.power@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=keith.wiles@intel.com; x-originating-ip: [47.24.6.94] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d6b9dfb6-d47a-41e9-483f-08d7dbe8776b x-ms-traffictypediagnostic: DM6PR11MB2604: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:595; x-forefront-prvs: 0367A50BB1 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4593.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(136003)(39850400004)(346002)(376002)(396003)(366004)(53546011)(6506007)(186003)(26005)(316002)(37006003)(36756003)(6636002)(478600001)(2616005)(6512007)(4326008)(8936002)(107886003)(8676002)(6862004)(81156014)(2906002)(6486002)(81166007)(54906003)(91956017)(76116006)(66946007)(66476007)(66556008)(66446008)(33656002)(86362001)(5660300002)(64756008)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sI74x6KcdpVBFzTQDLKR3SXickGFgS/cVBfD/iGxzVcUDTvnh6Efxnq9hOufP8giIilp4nhhOFnlhoXuq04inqxWfPT15cAmiqWwzh7mBgcWLNS6qzUoKssTzB55ylnRvjFAqp+IO7PmYAr+pDacTzbBBPiRHDIiyTdUI9FjYT/9BIaYZ2Kd3VgllDm6mJUSZG/Z7IGMq4zVtoYNDHmKKu9hJAPAZDbffoVe3TjrSrRZ13N1U6ZvpWvciO2BmdvQc2BcicMbeIRQoSmxkcVx/H68/qGaZmmq9T0DVfMiBFt2vMxnv0fFzq2Y/TxJPI01m5Qaq82bL1pBdEtG23FRJ1PC8P7vdpf9IRNSSx9FVvVLaPwWeJOE/tEu3tuqGPNt4cdOigsE7I6Q7zD8/Ng4eRkVkudMp85VaX+7tmkPI7dmFdaa32wp/o1CGoO5CK2o x-ms-exchange-antispam-messagedata: PKrPCoxd55TFlYkEos+bysG/l/kUay/pyFz9lBLyNPRnei0ktZicnh/h0FKth+okdZ/zGGqnMP/yp24aGQSoz53nLqnO9nZUqSg3qoE5FuR1Xkid1HAHV3h3+5LlerYu1Y7Zf2tVHH28r1t33c3KbA== Content-Type: text/plain; charset="utf-8" Content-ID: <7F8E5664DD11B844935F13062095D512@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d6b9dfb6-d47a-41e9-483f-08d7dbe8776b X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2020 18:12:57.5344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NoUhoO588UMRCCrK721LxZNxt4U5KIo1qH/09XTpdlvh3YuKiZ0DRDVl+J0LnvKvO06F9JBBtodNCBaZxGEgdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2604 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 06/16] telemetry: add utility functions for creating json X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" DQoNCj4gT24gQXByIDgsIDIwMjAsIGF0IDExOjQ5IEFNLCBQb3dlciwgQ2lhcmEgPGNpYXJhLn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