MCPcopy Create free account
hub / github.com/apache/avro-rs / parse_array

Method parse_array

avro/src/schema/parser.rs:691–704  ·  view source on GitHub ↗

Parse a `serde_json::Value` representing a Avro array type into a `Schema`.

(
        &mut self,
        complex: &Map<String, Value>,
        enclosing_namespace: NamespaceRef,
    )

Source from the content-addressed store, hash-verified

689 ) -> AvroResult<Schema> {
690 let types = complex
691 .remove("values")
692 .ok_or_else(|| Details::GetMapValuesField.into())
693 .and_then(|types| self.parse(types, enclosing_namespace))?;
694
695 Ok(Schema::Map(MapSchema {
696 types: Box::new(types),
697 attributes: self.get_custom_attributes(complex),
698 }))
699 }
700
701 /// Parse a `serde_json::Value` representing a Avro union type into a `Schema`.
702 fn parse_union(
703 &mut self,
704 items: Vec<Value>,
705 enclosing_namespace: NamespaceRef,
706 ) -> AvroResult<Schema> {
707 items

Callers 1

parse_complexMethod · 0.80

Calls 3

getMethod · 0.80
get_custom_attributesMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected