JSONArray jsonPartitions = new JSONArray(jsonContainer.getString("partitions"));
List<Partition> partitionsList = new ArrayList<Partition>(jsonPartitions.length());
for (int i = 0; i < jsonPartitions.length(); ++i) {
String partDesc = jsonPartitions.getString(i);
Partition partition = new Partition();
deserializer.deserialize(partition, partDesc, "UTF-8");
partitionsList.add(partition);
}
return new AbstractMap.SimpleEntry<Table, List<Partition>>(table, partitionsList);
} catch (JSONException e) {
throw new SemanticException(ErrorMsg.GENERIC_ERROR.getMsg("Error in serializing metadata"), e);