Skip to content

Commit 0fb927c

Browse files
authored
Bug fix in decoding List values. (#92)
1 parent 0ffbe2a commit 0fb927c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/base/value.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,7 @@ where
624624
}
625625
Self::from_json_values(fields_schema.iter().zip(v.into_iter()))
626626
}
627-
serde_json::Value::Object(v) => {
628-
if v.len() != fields_schema.len() {
629-
api_bail!("unmatched value length");
630-
}
631-
Self::from_json_object(v, fields_schema.iter())
632-
}
627+
serde_json::Value::Object(v) => Self::from_json_object(v, fields_schema.iter()),
633628
_ => api_bail!("invalid value type"),
634629
}
635630
}
@@ -812,7 +807,7 @@ where
812807
CollectionKind::List => {
813808
let rows = v
814809
.into_iter()
815-
.map(|v| Ok(FieldValues::from_json(v, &s.row.fields[1..])?.into()))
810+
.map(|v| Ok(FieldValues::from_json(v, &s.row.fields)?.into()))
816811
.collect::<Result<Vec<_>>>()?;
817812
Value::List(rows)
818813
}

0 commit comments

Comments
 (0)