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 27523200B2D for ; Thu, 16 Jun 2016 12:05:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2624A160A52; Thu, 16 Jun 2016 10:05:41 +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 6E12D160A51 for ; Thu, 16 Jun 2016 12:05:40 +0200 (CEST) Received: (qmail 16633 invoked by uid 500); 16 Jun 2016 10:05:39 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 16621 invoked by uid 99); 16 Jun 2016 10:05:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 10:05:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BDAE4C33D5 for ; Thu, 16 Jun 2016 10:05:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wQXxWarYGJYN for ; Thu, 16 Jun 2016 10:05:36 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 21FBE5FADE for ; Thu, 16 Jun 2016 10:05:36 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id f6so37206249lfg.0 for ; Thu, 16 Jun 2016 03:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DUZ4Od/HzD1CLDMnlrOI59GSnaN0habgeIt76hHQXcI=; b=ebyWjSAmSDdLg6a0cHbPzhNJfhXPcveeHwG5XvcIWdgsKoDoRit5GiWGD/AyZyzg0h IXWoUP/pgrN0cZ7i5cJGIbOLCGXERXWlR4V/LIZ5pV7MwNepvxVw9Pgsjqpk19k7BdMB xHGoSvp+FrNNoMVuOYC+5JeBGF5/Ubc8H3srw0ynXGKE3Cm8K4n8/CsJT/BDIWTIhJF2 UNaVISzpqyR0hzpNA3Hbc6Tr9MRxAgXI/wyP6o1NXWizjKMoeQjudQ/IA3YtypMcIqMe E8gkH2j9sBJpy3dP0lzbgeFh763AYA+0xyyVhnUBvcChzHsv9zoa1ZWnTHaX0yQ2DGbB X0Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DUZ4Od/HzD1CLDMnlrOI59GSnaN0habgeIt76hHQXcI=; b=SdMfHqMdWUvMAy43wzAGvduCDmxatYqqX9xyXNv+UWqHA4M/9xiYLWBeMkRU4uS3wk fVO2LyFRSBLaE1wwNx0kQ8FmLRIWDpYgyMc7/Fw2NAMxJr+Ec+In5I1PNSawKN9eEBfW RaL7U6EwWdZfcC+2ryH1vvYAWJQQe2ddiMH5QrdfTEq5aoQlNcOqWfk+VoGsPlQ/GPxR 3Xge3/nZhpJuy1FsLaHiBcEZBx8DLfY2vwoNnZXPcrp/VJNSYiLIf3wiEQJbjhv3dVoo gSwUuxjGIhtLCKo7USKfjrVLOhLaDB582T0MGu6vUbJdIK0vtrCWn/TPdEqPILEqMZPI Onkw== X-Gm-Message-State: ALyK8tLn66JCvmr/+RyImaayz7OkM2HxP/EPHy9fAEix87PETWTqIpRt42y3V4/I3c1yQqjbYhhK2k7up6QqQaT7 X-Received: by 10.46.33.152 with SMTP id h24mr903712lji.38.1466071534704; Thu, 16 Jun 2016 03:05:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.134.133 with HTTP; Thu, 16 Jun 2016 03:05:34 -0700 (PDT) In-Reply-To: References: From: Alexey Kuznetsov Date: Thu, 16 Jun 2016 17:05:34 +0700 Message-ID: Subject: Re: Change rest-http Java to JSON null transformation logic To: user@ignite.apache.org Cc: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1142c1d20aab070535626107 archived-at: Thu, 16 Jun 2016 10:05:41 -0000 --001a1142c1d20aab070535626107 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Pavel, we cannot omit them. Because if JSON will be transformed back to Java and some java field has not null default value that will lead to not correct de-serialization in this case. On Thu, Jun 16, 2016 at 4:54 PM, Pavel Tupitsyn wrote: > Why do we even write null fields? Can we just omit them? > This will be faster, more compact, and less ambiguous. > > Pavel. > > On Thu, Jun 16, 2016 at 12:51 PM, Denis Magda wrote= : > >> This looks strange. Definitely for consistency reasons it makes sense >> that all =E2=80=98null=E2=80=99 objects including string are serialized = as =E2=80=9Cnull=E2=80=9D. >> >> In regards to the compatibility stuff I think it can be resolved somehow= . >> >> =E2=80=94 >> Denis >> >> On Jun 16, 2016, at 12:15 PM, Alexey Kuznetsov >> wrote: >> >> Hi All! >> >> I'm working on migrating from outdated json-lib to Jackson issue >> IGNITE-3277 [1] and found that previous library serialize null strings a= s >> "" and null objects as "null", for example: >> {"a": "", "b": null} >> >> How about to serialize all values as "null" ? >> In this case we would definitely know that in Java before serialization >> to JSON was really NULL, not empty string. >> >> But this may break compatibility in some cases. >> >> Thoughts? >> >> >> 1. https://issues.apache.org/jira/browse/IGNITE-3277 >> >> -- >> Alexey Kuznetsov >> GridGain Systems >> www.gridgain.com >> >> >> > --=20 Alexey Kuznetsov GridGain Systems www.gridgain.com --001a1142c1d20aab070535626107--