serialize RichText instead

This commit is contained in:
Simon Gardling
2022-05-18 01:28:16 -04:00
parent d5eb99b3e7
commit c957eb45e6
5 changed files with 55 additions and 22 deletions

View File

@@ -126,11 +126,11 @@ fn main() {
}
}
let text_data: TextData = serde_json::from_value(serde_json::Value::Object(json_file_array))
.expect("Failed to convert data to TextData");
let text_data: TextDataRaw = serde_json::from_value(serde_json::Value::Object(json_file_array))
.expect("Failed to convert data to TextDataRaw");
let data = bincode::serialize(&TotalData {
text: text_data,
text: text_data.into_rich(),
fonts,
})
.unwrap();