This commit is contained in:
parent
b9ae0808fb
commit
c97027501c
1 changed files with 6 additions and 6 deletions
|
@ -29,12 +29,12 @@ pub fn decoder() -> Decoder(Survey) {
|
|||
decode.success(Survey(signature:, symbol:, deposits:, expiration:, size:))
|
||||
}
|
||||
|
||||
pub fn encode(data: Survey) -> Json {
|
||||
pub fn encode(survey: Survey) -> Json {
|
||||
json.object([
|
||||
#("signature", survey_signature.encode(data.signature)),
|
||||
#("symbol", waypoint_symbol.encode(data.symbol)),
|
||||
#("deposits", json.array(data.deposits, survey_deposit.encode)),
|
||||
#("expiration", json.string(birl.to_iso8601(data.expiration))),
|
||||
#("size", survey_size.encode(data.size)),
|
||||
#("signature", survey_signature.encode(survey.signature)),
|
||||
#("symbol", waypoint_symbol.encode(survey.symbol)),
|
||||
#("deposits", json.array(survey.deposits, survey_deposit.encode)),
|
||||
#("expiration", json.string(birl.to_iso8601(survey.expiration))),
|
||||
#("size", survey_size.encode(survey.size)),
|
||||
])
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue