Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7F5C1200CAE for ; Wed, 21 Jun 2017 20:03:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7D730160BD5; Wed, 21 Jun 2017 18:03:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C4E2C160BD0 for ; Wed, 21 Jun 2017 20:03:06 +0200 (CEST) Received: (qmail 65611 invoked by uid 500); 21 Jun 2017 18:03:06 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 65600 invoked by uid 99); 21 Jun 2017 18:03:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 18:03:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9019C19270C for ; Wed, 21 Jun 2017 18:03:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id EzwEhmc023LY for ; Wed, 21 Jun 2017 18:03:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0D45A60DB3 for ; Wed, 21 Jun 2017 18:03:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 759DDE0DE3 for ; Wed, 21 Jun 2017 18:03:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 44068240C7 for ; Wed, 21 Jun 2017 18:03:00 +0000 (UTC) Date: Wed, 21 Jun 2017 18:03:00 +0000 (UTC) From: "Mark Grey (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1582) Json serialization of nullable fileds and fields with default values improvement. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 21 Jun 2017 18:03:07 -0000 [ https://issues.apache.org/jira/browse/AVRO-1582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057938#comment-16057938 ] Mark Grey commented on AVRO-1582: --------------------------------- [~cutting] thanks! That clears up a lot actually. > Json serialization of nullable fileds and fields with default values improvement. > --------------------------------------------------------------------------------- > > Key: AVRO-1582 > URL: https://issues.apache.org/jira/browse/AVRO-1582 > Project: Avro > Issue Type: Improvement > Components: java > Affects Versions: 1.8.0 > Reporter: Zoltan Farkas > Attachments: AVRO-1582-PATCH > > > Currently serializing a nullable field of type union like: > "type" : ["null","some type"] > when serialized as JSON results in: > "field":{"some type":"value"} > when it could be: > "field":"value" > Also fields that equal the the default value can be omitted from the serialized data. This is possible because the reader will have the writer's schema and can infer the field values. This reduces the size of the json messages. -- This message was sent by Atlassian JIRA (v6.4.14#64029)