mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Handle empty arrays the same way we handle other arrays
This commit is contained in:
parent
271685cceb
commit
526793b5b2
@ -136,11 +136,7 @@ fn read_json_inner(
|
|||||||
match array_each(&mut deserializer, |obj| builder.append_json_object(&obj)) {
|
match array_each(&mut deserializer, |obj| builder.append_json_object(&obj)) {
|
||||||
// The json data has been deserialized and does not need to be processed again.
|
// The json data has been deserialized and does not need to be processed again.
|
||||||
// The data has been transferred to the writer during the deserialization process.
|
// The data has been transferred to the writer during the deserialization process.
|
||||||
Ok(Ok(count)) => {
|
Ok(Ok(_)) => (),
|
||||||
if count == 0 {
|
|
||||||
return Ok(count as usize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Ok(Err(e)) => return Err(DocumentFormatError::Internal(Box::new(e))),
|
Ok(Err(e)) => return Err(DocumentFormatError::Internal(Box::new(e))),
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
// If we cannot deserialize the content as an array of object then
|
// If we cannot deserialize the content as an array of object then
|
||||||
|
Loading…
Reference in New Issue
Block a user