Parse a `serde_json::Value` representing a Avro map type into a `Schema`.
(
&mut self,
default_namespace: &str,
complex: &Map<String, Value>,
)
| 1261 | /// Parse a `serde_json::Value` representing a Avro map type into a |
| 1262 | /// `Schema`. |
| 1263 | fn parse_map( |
| 1264 | &mut self, |
| 1265 | default_namespace: &str, |
| 1266 | complex: &Map<String, Value>, |
| 1267 | ) -> Result<SchemaPiece, AvroError> { |
| 1268 | complex |
| 1269 | .get("values") |
| 1270 | .ok_or_else(|| ParseSchemaError::new("No `values` in map").into()) |
| 1271 | .and_then(|items| self.parse_inner(default_namespace, items)) |
| 1272 | .map(|schema| SchemaPiece::Map(Box::new(schema))) |
| 1273 | } |
| 1274 | |
| 1275 | /// Parse a `serde_json::Value` representing a Avro union type into a |
| 1276 | /// `Schema`. |
no test coverage detected