[ 
https://issues.apache.org/jira/browse/AVRO-3001?focusedWorklogId=803075&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-803075
 ]

ASF GitHub Bot logged work on AVRO-3001:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Aug/22 01:58
            Start Date: 24/Aug/22 01:58
    Worklog Time Spent: 10m 
      Work Description: rayokota commented on PR #1833:
URL: https://github.com/apache/avro/pull/1833#issuecomment-1225083274

   > How about a union with a member that is a record with a namespace? The 
[JSON 
Encoding](https://avro.apache.org/docs/1.11.1/specification/#json-encoding) 
specification says
   > 
   > > otherwise it is encoded as a JSON object with one name/value pair whose 
name is the type’s name and whose value is the recursively encoded value. For 
Avro’s named types (record, fixed or enum) the user-specified name is used, for 
other types the type name is used.
   > 
   > which refers to the record _name_ rather than _fullname_.
   
   @KalleOlaviNiemitalo , I added a test for a union containing a record with a 
namespace as you requested.  The Java code uses the fullname for the union 
label 
[here](https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ValidatingGrammarGenerator.java#L104).
   Since the C# code is a straight port of the Java code, it uses the fullname 
for the union label 
[here](https://github.com/apache/avro/blob/1133acda686fb1ff96fcbb80ca606c20e261f343/lang/csharp/src/apache/main/IO/Parsing/ValidatingGrammarGenerator.cs#L111)




Issue Time Tracking
-------------------

    Worklog Id:     (was: 803075)
    Time Spent: 3h 40m  (was: 3.5h)

> JsonEncode Decode support for C#
> --------------------------------
>
>                 Key: AVRO-3001
>                 URL: https://issues.apache.org/jira/browse/AVRO-3001
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.10.0, 1.11.0
>            Reporter: Krishnan Unni
>            Assignee: Robert Yokota
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> The C# library for avro currently supports only the Binary encoding and also 
> with compile time types (Generic support only). As part of a project I am 
> doing I need to validate the avro schema against the incoming json data on 
> the fly without a predefined type (generated class). So basically comparing 
> an avro schema (string/json representation) against a raw json string. It is 
> possible with the Java library since it supports both non generic types and 
> streams as well as json encoding. With C# currently this is not possible. Is 
> there a plan to extend the C# library to provide these features? If yes, is 
> there a timeline? If not is there any alternative to achieve this? 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to