Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 74AD2781F for ; Mon, 21 Nov 2011 17:26:54 +0000 (UTC) Received: (qmail 59824 invoked by uid 500); 21 Nov 2011 17:26:54 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 59611 invoked by uid 500); 21 Nov 2011 17:26:53 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 59594 invoked by uid 99); 21 Nov 2011 17:26:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 17:26:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of markus.resch@teamaol.com designates 205.188.105.145 as permitted sender) Received: from [205.188.105.145] (HELO imr-da03.mx.aol.com) (205.188.105.145) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 17:26:47 +0000 Received: from aolfrrmec31.ad.aol.aoltw.net (aolfrrmec31.office.aol.com [10.149.226.42]) by imr-da03.mx.aol.com (8.14.1/8.14.1) with ESMTP id pALHQKZd024605 for ; Mon, 21 Nov 2011 12:26:20 -0500 Received: from [10.168.204.55] (172.17.52.163) by aolfrrmec31.ad.aol.aoltw.net (10.149.226.42) with Microsoft SMTP Server id 14.1.355.2; Mon, 21 Nov 2011 17:26:19 +0000 Subject: Using optional fields (nullable unions) with the C-API From: Markus Resch To: Content-Type: text/plain; charset="UTF-8" Organization: AdTech Date: Mon, 21 Nov 2011 18:26:19 +0100 Message-ID: <1321896379.18272.17.camel@mresch.office.aol.com> MIME-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.52.163] Hey avro users, I'm using a record like this { "type" : "record", "name" : "TestPacket", "fields" : [ { "name" : "Id" , "type" : "int"}, { "name" : "Value" , "type" : ["string","null"]} ] } But if I just not write anything to the 'Value' filed, avro_writer_memory() refuses to validate it. How do you normally use the optional fields with the C-API? Regards, Markus -- Markus Resch Software Developer P: +49 6103-5715-0 | F: +49 6103-5715-111 | ADTECH AG | Robert-Bosch-Str. 32 | 63303 Dreieich | Germany www.adtech.com ADTECH | A Division of Advertising.com Group - Residence of the Company: Dreieich, Germany - Registration Office Offenbach HRB 34657 Chairman of the Board: Erhard Neumann - Chairman of the Supervisory Board: Ned Brody This message contains privileged and confidential information. Any dissemination, distribution, copying or other use of this message or any of its content (data, prices...) to any third parties may only occur with ADTECH's prior consent.