From dev-return-28659-apmail-geode-dev-archive=geode.apache.org@geode.apache.org Tue May 1 22:55:06 2018 Return-Path: X-Original-To: apmail-geode-dev-archive@minotaur.apache.org Delivered-To: apmail-geode-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDACA1808A for ; Tue, 1 May 2018 22:55:06 +0000 (UTC) Received: (qmail 75499 invoked by uid 500); 1 May 2018 22:55:06 -0000 Delivered-To: apmail-geode-dev-archive@geode.apache.org Received: (qmail 75445 invoked by uid 500); 1 May 2018 22:55:06 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 75425 invoked by uid 99); 1 May 2018 22:55:06 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2018 22:55:06 +0000 Received: from mail-ua0-f200.google.com (mail-ua0-f200.google.com [209.85.217.200]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id C2003724 for ; Tue, 1 May 2018 22:41:51 +0000 (UTC) Received: by mail-ua0-f200.google.com with SMTP id g34so12206228uaa.9 for ; Tue, 01 May 2018 15:41:51 -0700 (PDT) X-Gm-Message-State: ALQs6tB8/pYWAhXsAfTU/7DBWICqJsxrl1SSUYd37S2Nj3Ao/hwl7Fqx 3c4UqAi8neea1xM8kAgY2jdHf399EtO3/NYYKTmEUr4MAGC1E/1gerO6WooxFdo57mrGbGq14MN 7egCURnWW2ScRxWgnhbUrdQ5Vh3tR6mtXsWscHF8pAahtjGWDwKuXO/Y= X-Received: by 10.159.33.135 with SMTP id 7mr16379393uac.184.1525214510740; Tue, 01 May 2018 15:41:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqyw/UPYpn+SoyEtlJIVHADiIXy8lYp2HW3k/KhBXbTc5hY668iZMZ1TI5Oz/ZHNWSPhuICRGp4nizuPEvZTVk= X-Received: by 10.159.33.135 with SMTP id 7mr16379391uac.184.1525214510620; Tue, 01 May 2018 15:41:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.37.15 with HTTP; Tue, 1 May 2018 15:41:49 -0700 (PDT) From: Jens Deppe Date: Tue, 1 May 2018 15:41:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Better support for JSON gfsh results To: dev@geode.apache.org Content-Type: multipart/alternative; boundary="001a114506ba1cc1ad056b2cad8d" --001a114506ba1cc1ad056b2cad8d Content-Type: text/plain; charset="UTF-8" Hi All, I'm working on removing our dependency on geode-json (org.json) in favor of Jackson. Initially this work has revolved around refactoring the internal results from gfsh commands (nothing that is user-visible). I'm now looking at the various gfsh 'data' commands (get, put, query and locate) and would very much like them to produce more meaningful, (actual JSON), structured results. For example, a get on a region containing a simple 'User' object produces this output. Result : true Key Class : java.lang.String Key : jondoe Value Class : org.apache.geode.management.internal.cli.commands.GetCommandIntegrationTest.User This is not very helpful and only really shows that the value, for the given key, actually exists. Querying a PDX object is more informative: Result : true Key Class : java.lang.String Key : jondoe Value Class : org.apache.geode.pdx.internal.PdxInstanceImpl username | hashcode -------- | -------- jondoe | 38de41a9 This brings me to the actual question. Although our Java API is backwards compatible, the gfsh output has never been considered an 'API' in terms of the structure of it's output text. However, I do want to ask that if we start making changes to these commands, to produce actual JSON results, will that cause anyone any pain? Thoughts / comments? --Jens --001a114506ba1cc1ad056b2cad8d--