Parse a `serde_json::Value` representing a Avro array type into a `Schema`.
(
&mut self,
default_namespace: &str,
complex: &Map<String, Value>,
)
| 1247 | /// Parse a `serde_json::Value` representing a Avro array type into a |
| 1248 | /// `Schema`. |
| 1249 | fn parse_array( |
| 1250 | &mut self, |
| 1251 | default_namespace: &str, |
| 1252 | complex: &Map<String, Value>, |
| 1253 | ) -> Result<SchemaPiece, AvroError> { |
| 1254 | complex |
| 1255 | .get("items") |
| 1256 | .ok_or_else(|| ParseSchemaError::new("No `items` in array").into()) |
| 1257 | .and_then(|items| self.parse_inner(default_namespace, items)) |
| 1258 | .map(|schema| SchemaPiece::Array(Box::new(schema))) |
| 1259 | } |
| 1260 | |
| 1261 | /// Parse a `serde_json::Value` representing a Avro map type into a |
| 1262 | /// `Schema`. |
no test coverage detected