Skip to content

Commit

Permalink
responses: fix EvaluateResponse serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sztomi committed Jul 29, 2023
1 parent d11a34a commit a558ed6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dap/src/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ pub struct EvaluateResponse {
/// The type of the evaluate result.
/// This attribute should only be returned by a debug adapter if the
/// corresponding capability `supportsVariableType` is true.
#[serde(rename = "type")]
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub type_field: Option<String>,
/// Properties of an evaluate result that can be used to determine how to
/// render the result in the UI.
#[serde(skip_serializing_if = "Option::is_none")]
pub presentation_hint: Option<VariablePresentationHint>,
/// If `variablesReference` is > 0, the evaluate result is structured and its
/// children can be retrieved by passing `variablesReference` to the
Expand All @@ -84,17 +85,20 @@ pub struct EvaluateResponse {
/// The client can use this information to present the variables in a paged
/// UI and fetch them in chunks.
/// The value should be less than or equal to 2147483647 (2^31-1).
#[serde(skip_serializing_if = "Option::is_none")]
pub named_variables: Option<i64>,
/// The i64 of indexed child variables.
/// The client can use this information to present the variables in a paged
/// UI and fetch them in chunks.
/// The value should be less than or equal to 2147483647 (2^31-1).
#[serde(skip_serializing_if = "Option::is_none")]
pub indexed_variables: Option<i64>,
/// A memory reference to a location appropriate for this result.
/// For pointer type eval results, this is generally a reference to the
/// memory address contained in the pointer.
/// This attribute should be returned by a debug adapter if corresponding
/// capability `supportsMemoryReferences` is true.
#[serde(skip_serializing_if = "Option::is_none")]
pub memory_reference: Option<String>,
}

Expand Down

0 comments on commit a558ed6

Please sign in to comment.