-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some JSON bodies pass integers as strings.
{
"unit": "lovelace",
"quantity": "500000"
}Here's the current struct for this (simplified):
#[derive(Deserialize)]
pub struct Amount {
pub unit: String,
pub quantity: String,
}It must be changed to:
#[derive(Deserialize)]
pub struct Amount {
pub unit: String,
#[serde_hacks]
pub quantity: Integer,
}Where Integer is our type alias for i128 and serde_hacks is the custom deserialization for that specific field.
Some options to customize this:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request