This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
Don't serialize back to Pinboard API named fields in template #3
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
The Pinboard API calls a title
description
, and a descriptionextended
. When deserializing the JSON response to thePost
struct, we rename those fields using Serde:bulletin/src/main.rs
Lines 52 to 55 in e16f06e
However, when serializing the
Post
s to be used in the final template (using Tera's built-in support for Serde), the fields get renamed back to their original Pinboard-described names:bulletin/src/main.rs
Lines 109 to 114 in e16f06e
We should keep the new
title
anddescription
field names instead. This can be done using the (undocumented) attribute:#[serde(rename(deserialize = "description"))]
The text was updated successfully, but these errors were encountered: